|
-
Jun 20th, 2006, 11:33 AM
#1
Thread Starter
Hyperactive Member
syntax error in sql statement...
I am writing a "insert" sql statement.
and I get exception as "Syntax error (missing operator) in query expression '6/20/2006 9:30:45 AM'."
The following is the sql statement:
string ssql = "INSERT INTO AT_ARC_ADVANCES(AT_ARC_DATA_DATE,AT_ARC_MATURITY) VALUES ";
ssql = ssql + "("+ DateTime.Now + ','+ "2 Years" + ")";
try
{
accessCommand.CommandText = ssql;
accessConnection.Open();
accessCommand.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|