Hello All,
I am trying to use simple update statement but I am keep getting this error message:
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
Following is the code I am trying to execute:
Dim strSQL as string
strSQL = "PROVIDER=Microsoft.Jet.oLEDB.4.0;Data " & "Source=C:\xxx\xxxx.mdb"
Dim conn As New OleDbConnection(strSQL)
Dim cmd As New OleDbCommand("Update table_name set column_name = test", conn)
cmd.CommandType = CommandType.Text
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
conn = Nothing
cmd = Nothing
Could someone please tell me what am I doing wrong here?
Thanks.
I am trying to use simple update statement but I am keep getting this error message:
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
Following is the code I am trying to execute:
Dim strSQL as string
strSQL = "PROVIDER=Microsoft.Jet.oLEDB.4.0;Data " & "Source=C:\xxx\xxxx.mdb"
Dim conn As New OleDbConnection(strSQL)
Dim cmd As New OleDbCommand("Update table_name set column_name = test", conn)
cmd.CommandType = CommandType.Text
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
conn = Nothing
cmd = Nothing
Could someone please tell me what am I doing wrong here?
Thanks.