string sql = "select * from user where user_name='" +t1.Text
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/10/07 22:27:05
string sql = "select * from user where user_name='" +t1.Text.Trim()+ "' and user_password='"+t2.Tex
string sql = "select * from user where user_name='" +t1.Text.Trim()+ "' and user_password='"+t2.Text.Trim()+ "'";错在哪里啊?
protected void Button1_Click(object sender,EventArgs e)
{
string str="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server .MapPath ("App_Data/user.mdb");
OleDbConnection conn = new OleDbConnection(str);
conn.Open();
string sql = "select * from user where user_name='" +t1.Text.Trim()+ "' and user_password='"+t2.Text.Trim()+ "'";
OleDbCommand oledbcommand = new OleDbCommand(sql,conn);
OleDbDataReader rd = oledbcommand.ExecuteReader();
int add=0;
while (rd.Read()) { add++; }
if(add ==0){
Response .Write ("需要进入系统!");}
else
{ Response .Redirect ("index.aspx");
}
请帮小弟看看这段asp.net中的代码,我点登录按钮时总是提示“from子句错误”,
string sql = "select * from user where user_name='" +t1.Text.Trim()+ "' and user_password='"+t2.Text.Trim()+ "'";错在哪里啊?
protected void Button1_Click(object sender,EventArgs e)
{
string str="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server .MapPath ("App_Data/user.mdb");
OleDbConnection conn = new OleDbConnection(str);
conn.Open();
string sql = "select * from user where user_name='" +t1.Text.Trim()+ "' and user_password='"+t2.Text.Trim()+ "'";
OleDbCommand oledbcommand = new OleDbCommand(sql,conn);
OleDbDataReader rd = oledbcommand.ExecuteReader();
int add=0;
while (rd.Read()) { add++; }
if(add ==0){
Response .Write ("需要进入系统!");}
else
{ Response .Redirect ("index.aspx");
}
请帮小弟看看这段asp.net中的代码,我点登录按钮时总是提示“from子句错误”,
string sql = "select * from user where user_name='" +t1.Text
String sql = "select * from tb_consumer where account='" + a
下面的SQL语句select * from [viwBasket] where tblUser='" + (string
select * from user_info where user_name in (select user_name
SELECT name FROM [BookStore].[dbo].[user] WHERE userid=?AND
SQL >select count(*) from Teacher where teacherCode=? and te
sql="select discount_value from shop_discount where discount
sql6 = "select * from khxx_data where" + Trim(SSBox.Text) +
string strsql1 ="select * from product where name=session[pr
String sql=" delete from rizhi where data="+data;为什么总是报错,dat
if (pastart = -1) sql.append("select * from("); sql.append("
sql="select * from "&data&" where id="&myid&"" 在数据库中没有data 这