Monday, April 16, 2012 1:56 PM
i am having trouble with the inserting of new values though the textboxes. it gives me the error Syntax error in INSERT INTO statement.,OLEDBEXCEPTION was unhandled at --->
Below is my code for Ms-Access dbase:
Private Sub btnCommit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCommit.Click
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsNewRow As DataRow
dsNewRow = ds.Tables("Doc").NewRow()
dsNewRow.Item("First Name") = First_NameTextBox.Text
dsNewRow.Item("Surname") = Last_NameTextBox.Text
MsgBox("New Record added to the Database")
btnCommit.Enabled = False
btnAddNew.Enabled = True
- Changed Type HemangiL Monday, April 16, 2012 2:36 PM
Tuesday, April 17, 2012 8:46 AMModerator
Thank you for posting in the MSDN forum.
I’m afraid that it is not the correct forum about this issue, since this forum is to discuss Visual Studio Debugger tool.
Based on your description, it seems that it is related to VB, if so, like this thread “Syntax error in INSERT INTO statement. OLEDBEXCEPTION was unhandled”, you could post it for dedicated support. Thanks for your understanding.
Have a nice day,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us