Imry
2005-05-04 20:20:01 UTC
Hi.
I'm using the ExecuteNonQuery command, and everytime I try running it, I get
this error: "An unhandled exception of type
'System.Data.OleDb.OleDbException' occurred in system.data.dll".
When I run the SQL in ACCESS itself, it work perfectly.
I would appriciate any help.
This is my code:
Dim NewConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\db1.mdb"
Dim NewConnection As New OleDbConnection(NewConnectionString)
Dim NewSQL As String = "UPDATE Important_Dates SET session = 3 where college
= 'CAS'"
Dim NewCommand As New OleDbCommand(NewSQL, NewConnection)
NewCommand.Connection.Open()
NewCommand.ExecuteNonQuery()
I'm using the ExecuteNonQuery command, and everytime I try running it, I get
this error: "An unhandled exception of type
'System.Data.OleDb.OleDbException' occurred in system.data.dll".
When I run the SQL in ACCESS itself, it work perfectly.
I would appriciate any help.
This is my code:
Dim NewConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\db1.mdb"
Dim NewConnection As New OleDbConnection(NewConnectionString)
Dim NewSQL As String = "UPDATE Important_Dates SET session = 3 where college
= 'CAS'"
Dim NewCommand As New OleDbCommand(NewSQL, NewConnection)
NewCommand.Connection.Open()
NewCommand.ExecuteNonQuery()