Trying to use ExecuteNonQuery on Command crashes
- From: "Imry" <Imry@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 4 May 2005 13:20:01 -0700
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()
.
- Follow-Ups:
- RE: Trying to use ExecuteNonQuery on Command crashes
- From: Sameer
- RE: Trying to use ExecuteNonQuery on Command crashes
- From: cpuckle
- RE: Trying to use ExecuteNonQuery on Command crashes
- Prev by Date: RE: Microsoft Oracle OLEDB provider connection severe problem
- Next by Date: COMException (0x80040154): Class not registered
- Previous by thread: RE: Microsoft Oracle OLEDB provider connection severe problem
- Next by thread: RE: Trying to use ExecuteNonQuery on Command crashes
- Index(es):