468,103 Members | 1,229 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Unhandled Exception while executing SQL command

hi
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 1397
shweta123
692 Expert 512MB
Hi,

Can you please specify your SQL query ? There must be some syntax error.
Mar 12 '07 #2
hi
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?


thanks.
Mar 13 '07 #3
shweta123
692 Expert 512MB
Hi,

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
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.