JoshuaLuke
02-16-2003, 07:31 AM
I've included a link to my cs file in rtf format and will highlite the pertinent functions with bold.
Basically, I have the data in one table in an mdb and access it using oledb and load it into a DataSet. Then I use a command builder to create all the sql (and I have tried it manually as well) and everything works except for the insert command; delete, select, and update all work.
The error I get is:
System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at ssbg.sv.ButtonAdd_Click(Object sender, EventArgs e)
I'm stumped, please help.
Table details:
ProductID (AutoNumber, also primary key)
Title (text)
Image (text)
Visible (Yes/No)
Price (double, currency)
Monogram (double, currency)
Shipping (double, currency)
MonoMaxLines (integer)
MonoMaxChars (integer)
Description (memo)
The field types are the Access definition, not the C# defs.
Here is the link for the source code file:
www.thyword.info/ssbg/db.rtf (http://www.thyword.info/ssbg/db.rtf)
Basically, I have the data in one table in an mdb and access it using oledb and load it into a DataSet. Then I use a command builder to create all the sql (and I have tried it manually as well) and everything works except for the insert command; delete, select, and update all work.
The error I get is:
System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at ssbg.sv.ButtonAdd_Click(Object sender, EventArgs e)
I'm stumped, please help.
Table details:
ProductID (AutoNumber, also primary key)
Title (text)
Image (text)
Visible (Yes/No)
Price (double, currency)
Monogram (double, currency)
Shipping (double, currency)
MonoMaxLines (integer)
MonoMaxChars (integer)
Description (memo)
The field types are the Access definition, not the C# defs.
Here is the link for the source code file:
www.thyword.info/ssbg/db.rtf (http://www.thyword.info/ssbg/db.rtf)