.net中的公共类填充数据集错误 Incorrect syntax near the keyword 'INTO' 是这个错误提示,查询没问题
publicDataSetselect(stringsqldl){com=newSqlCommand(sqldl,con);da=newSqlDataAdapter(sq...
public DataSet select(string sqldl)
{
com = new SqlCommand(sqldl ,con);
da = new SqlDataAdapter(sqldl, con);//适配器 断点查询
da.Fill(ds);//填充数据集
return ds;//返回值
}
子页填充报错
子页代码
ado cx = new ado();
string txt1 = TextBox3.Text;
string txt2 = TextBox4.Text;
this.GridView1.DataSource = cx.select("INSTERT INTO dl ([Username],[Password])VALUES(" + txt1 + "," + txt2 + ")").Tables[0].DefaultView;
this.GridView1.DataBind();
请教高手了 哈 谢谢! 展开
{
com = new SqlCommand(sqldl ,con);
da = new SqlDataAdapter(sqldl, con);//适配器 断点查询
da.Fill(ds);//填充数据集
return ds;//返回值
}
子页填充报错
子页代码
ado cx = new ado();
string txt1 = TextBox3.Text;
string txt2 = TextBox4.Text;
this.GridView1.DataSource = cx.select("INSTERT INTO dl ([Username],[Password])VALUES(" + txt1 + "," + txt2 + ")").Tables[0].DefaultView;
this.GridView1.DataBind();
请教高手了 哈 谢谢! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询