470,811 Members | 1,294 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

Unhandled Exception while executing SQL command

Im trying to create connection in c# with Access database
and got exception at command.ExecuteNonQuery()--

Unhandled Exception of type 'System.Data.OleDb.OleDbException' occured in System.Data.dll

Additional Information : Syntax Error in Field Definition

Thank you in advance,
Mar 12 '07 #1
3 1464
692 Expert 512MB

Can you please specify your SQL query ? There must be some syntax error.
Mar 12 '07 #2
it is
cmd = new OleDbCommand(Create Table a1 (no integer,name char(10)",s')

s is connection name;
it gives error at cmd.ExecuteNonQuery();

wat is going wrong?

Mar 13 '07 #3
692 Expert 512MB

You should write it as

cmd = new OleDbCommand(Create Table a1 (no integer,name char(10),s)
Mar 13 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Professor Frink | last post: by
1 post views Thread by Salvador Ponticelli | last post: by
5 posts views Thread by Lucvdv | last post: by
reply views Thread by Colmeister | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.