benlinkknilneb
Programmer
Hi all, here's the code:
Dim DBase As New OleDb.OleDbConnection(DBString)
Dim Adpt As New OleDb.OleDbDataAdapter()
Dim Cmd As New OleDb.OleDbCommand(SQLStatement, DBase)
Adpt.InsertCommand = Cmd
DBase.Open()
Cmd.ExecuteNonQuery()
DBase.Close()
Further Information:
-DBString is the Connection String. This is passed from another part of the program, and it has been used in at least one other location in the code by the time it gets to this point.
-I have verified the contents of SQLStatement... it is an Insert Query and it works if entered directly into Access.
It always hangs on "ExecuteNonQuery()" and gives me the same error type: System.Data.OleDb.OleDbException. No other information shows in the error screen. What am I doing wrong?
Ben
Dim DBase As New OleDb.OleDbConnection(DBString)
Dim Adpt As New OleDb.OleDbDataAdapter()
Dim Cmd As New OleDb.OleDbCommand(SQLStatement, DBase)
Adpt.InsertCommand = Cmd
DBase.Open()
Cmd.ExecuteNonQuery()
DBase.Close()
Further Information:
-DBString is the Connection String. This is passed from another part of the program, and it has been used in at least one other location in the code by the time it gets to this point.
-I have verified the contents of SQLStatement... it is an Insert Query and it works if entered directly into Access.
It always hangs on "ExecuteNonQuery()" and gives me the same error type: System.Data.OleDb.OleDbException. No other information shows in the error screen. What am I doing wrong?
Ben