high there
I have a database is access and a project in VisualBasic.
Now I want to update the yes/no (checkbox) field in table tbl_verhuurd (dutch for tbl_rental)
But I keep getting errors...
Is it that hard to update a checkbox? all the other fields worked just fine.
I have a database is access and a project in VisualBasic.
Now I want to update the yes/no (checkbox) field in table tbl_verhuurd (dutch for tbl_rental)
But I keep getting errors...
VB.NET:
intfilm = 4
Dim db_file As String
Dim statement As String
Dim conn As adodb.Connection
Dim Rs As adodb.Recordset
' Get the data.
db_file = App.Path
If Right$(db_file, 1) <> "\" Then db_file = db_file & _
"\"
db_file = db_file & "db1.mdb"
' Open a connection.
Set conn = New adodb.Connection
conn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & db_file & ";" & _
"Persist Security Info=False"
conn.Open
' Select the data.
'enkel de NIET verhuurde films tonen
statement = "select verhuurd, id from tbl_verhuurd where id=" & intfilm
' Get the records.
Set Rs = conn.Execute(statement, , adCmdText)
'check the checkbox in the table
Rs!verhuurd = -1
Rs.Update
' Close the recordset and connection.
Rs.Close
conn.Close
Is it that hard to update a checkbox? all the other fields worked just fine.