Syntax error in INSERT INTO statement
Posted
by Amit Kr. Ghosh
on Stack Overflow
See other posts from Stack Overflow
or by Amit Kr. Ghosh
Published on 2010-06-17T21:12:57Z
Indexed on
2010/06/17
21:23 UTC
Read the original article
Hit count: 282
c#
|oledbcommand
conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\database.mdb");
conn.Open();
com = new OleDbCommand(@"insert into group
(groupid,groupname,nature,effect)
values
(@groupid,@groupname,@nature,@effect)", conn);
com.Parameters.AddWithValue("@groupid", intialtxt);
com.Parameters.AddWithValue("@groupname", groupnametxt);
com.Parameters.AddWithValue("@nature", groupnaturecombo);
com.Parameters.AddWithValue("@effect", efectivegroupcombo);
com.ExecuteNonQuery();
conn.Close()
i have write this connection ,but i get one error Syntax error in INSERT INTO statement please someone help me.
© Stack Overflow or respective owner