多部分标识符"abc@gmail.com"不能被束缚 [英] The multi-part identifier "abc@gmail.com" could not be bound

查看:137
本文介绍了多部分标识符"abc@gmail.com"不能被束缚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了以下sql语句并发现了以上错误:

i have tried this following sql statement and found the above error:

Textbox1.text=abc@gmail.com;
string chksql="select reg_id from reg_details where reg_email="+Textbox1.text;
adp = new SqlDataAdapter(chksql, con);
tbl = new DataTable();
adp.Fill(tbl);

推荐答案

替换此

replace this

Textbox1.text=abc@gmail.com;
string chksql="select reg_id from reg_details where reg_email="+Textbox1.text;



与此



with this

TextBox1.Text="abc@gmail.com";

string chksql="select reg_id from reg_details where reg_email='"+TextBox1.Text+"'";


这篇关于多部分标识符"abc@gmail.com"不能被束缚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆