Hi,
I'm using the following code in .NET to insert some data into a table. The connection is already open other commands are working.
mySQL = "INSERT INTO tblWINTER_DETAILS (RECORDNUM, ITEMNUM, DETAILS, ACTION) VALUES (" + recNum + ", " +
"1, " + "'This is a detail', " + "'Action this');";
myCommand.CommandText = mySQL;
myCommand.ExecuteNonQuery();
I am getting an 'Invalid Text' error, but if I go into debug mode, copy and paste the value of mySQL directly into the MS Access database and run the SQL Query, it inserts the record with no problems.
Any ideas?? The error I am getting is code # -2147217900
I'm using the following code in .NET to insert some data into a table. The connection is already open other commands are working.
mySQL = "INSERT INTO tblWINTER_DETAILS (RECORDNUM, ITEMNUM, DETAILS, ACTION) VALUES (" + recNum + ", " +
"1, " + "'This is a detail', " + "'Action this');";
myCommand.CommandText = mySQL;
myCommand.ExecuteNonQuery();
I am getting an 'Invalid Text' error, but if I go into debug mode, copy and paste the value of mySQL directly into the MS Access database and run the SQL Query, it inserts the record with no problems.
Any ideas?? The error I am getting is code # -2147217900