K
KavvY
Hi
Can anyone tell me why I get a SQL syntax error with the following code?
string strInsert = "INSERT INTO dateEntry (entry, date) VALUES ('test3',
'17/08/2004')";
OleDbCommand cmd = new OleDbCommand(strInsert, oleDbConnection1);
try
{
oleDbConnection1.Open();
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
tbxOutput.Text = ex.Message;
}
finally
{
oleDbConnection1.Close();
}
Can anyone tell me why I get a SQL syntax error with the following code?
string strInsert = "INSERT INTO dateEntry (entry, date) VALUES ('test3',
'17/08/2004')";
OleDbCommand cmd = new OleDbCommand(strInsert, oleDbConnection1);
try
{
oleDbConnection1.Open();
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
tbxOutput.Text = ex.Message;
}
finally
{
oleDbConnection1.Close();
}