标签:des style blog io color ar os sp div
我在用c#写access2003 sql insert into时碰到了语句报语法错误的报错。
修改成这样的代码就可以执行了
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\SmartHome\\Desktop\\data.mdb"); OleDbCommand cmd = new OleDbCommand(); cmd.Connection = con; cmd.CommandText = @"INSERT INTO [test1] ([id],[username],[password]) VALUES (‘111‘,‘3‘,‘4‘);";//这个是关键
con.Open(); cmd.ExecuteNonQuery(); con.Close();
access2003 sql insert into语句报语法错误
标签:des style blog io color ar os sp div
原文地址:http://www.cnblogs.com/wlmLinker/p/4090331.html