标题:插入语法错误?
取消只看楼主
zgjxl
Rank: 1
等 级:新手上路
帖 子:68
专家分:0
注 册:2006-11-14
 问题点数:0 回复次数:0 
插入语法错误?

提示insert into 语法错误?

哪错了?
public void insertUser(string username,string userpwd,string userqq,string useremail)
{
OleDbConnection conn=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Inetpub\\wwwroot\\bbs\\mydata.mdb");
OleDbCommand cmd=new OleDbCommand("insert into user(UserName,UserPwd,UserQQ,UserEmail)Values(@username,@userpwd,@userqq,@useremail)",conn);
conn.Open();
cmd.Parameters.Add(new OleDbParameter("@username",OleDbType.LongVarChar,50));
cmd.Parameters["@username"].Value=username;
cmd.Parameters.Add(new OleDbParameter("@userpwd",OleDbType.LongVarChar,50));
cmd.Parameters["@userpwd"].Value=userpwd;
cmd.Parameters.Add(new OleDbParameter("@userqq",OleDbType.LongVarChar,50));
cmd.Parameters["@userqq"].Value=userqq;
cmd.Parameters.Add(new OleDbParameter("@useremail",OleDbType.LongVarChar,50));
cmd.Parameters["@useremail"].Value=useremail;
cmd.ExecuteNonQuery();
conn.Close();

}

搜索更多相关主题的帖子: 语法 
2006-12-14 15:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-109487-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.377625 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved