M
MW
Hello,
I have a problem with calling INSERT command. It throws everytime a SQL
exception, even though the syntax is proper. At the begining I've tried
using OleDbCommand, and it worked for 2 tables, but it doesn't work for
third final one. These are really easy tables, so I'm really shocked it
doesn't work. Lately I've tried simple OleDbCommand, but it still doesn't
work. Did anyone bump into this problem earlier ?
Table has three columns:
Name : DataType
1. RowID : AutoNumber
2. ContactID : Text
3. Date : Date/Time
The last version of the code, that still generates error is:
OleDbCommand comm = new OleDbCommand("INSERT INTO DataTable(ContactID, Date)
VALUES(dfsfsdfdf, 3/3/2002)",
this.databaseConnection);
comm.ExecuteNonQuery();
I appreciete any help,
Marcin Waligora
I have a problem with calling INSERT command. It throws everytime a SQL
exception, even though the syntax is proper. At the begining I've tried
using OleDbCommand, and it worked for 2 tables, but it doesn't work for
third final one. These are really easy tables, so I'm really shocked it
doesn't work. Lately I've tried simple OleDbCommand, but it still doesn't
work. Did anyone bump into this problem earlier ?
Table has three columns:
Name : DataType
1. RowID : AutoNumber
2. ContactID : Text
3. Date : Date/Time
The last version of the code, that still generates error is:
OleDbCommand comm = new OleDbCommand("INSERT INTO DataTable(ContactID, Date)
VALUES(dfsfsdfdf, 3/3/2002)",
this.databaseConnection);
comm.ExecuteNonQuery();
I appreciete any help,
Marcin Waligora