-1

我在 sql 语句中遇到错误。

("服务器 = RAJ-PC\SQLEXPRESS; 用户 id=sa; 密码=as64ws; 数据库=onlineshopping", "select * from customer where userid='" + TextBox1.Text + "', password='" + TextBox2.Text + "'");

我写了这个语句来连接到 SQL Server。密码附近的 SQL 语句中显示错误。我的错误是什么???

4

1 回答 1

6

多个 where 子句使用 AND 而不是,.

("server= RAJ-PC\SQLEXPRESS; user id=sa; password=as64ws; database=onlineshopping", "select * from customer where userid='" + TextBox1.Text + "' AND password='" + TextBox2.Text + "'");
于 2012-06-12T05:55:53.470 回答