查询语句中的一段代码
小弟写了下面一行代码
ADOQuery1-> SQL-> Text= "Select* from ' " + ComboBox3-> Text " ' where Uname = "+Edit3-> Text;
ADOQuery1-> SQL-> Text= "Select * from ' " + ComboBox3-> Text " ' where No = " + Edit2-> Text;
编译的时候提示两行都出现同样的错误 说 Statement missing ; 我找了好几遍 明明有写;来着
怎么回事 请各位大虾帮忙看看
[解决办法]
两个ComboBox3-> Text后面都少了+
另外,SQL中少空格(这个与编译错无关,但SQL会出错)
ADOQuery1-> SQL-> Text= "Select * from ' " + ComboBox3-> Text+ " ' where Uname = "+Edit3-> Text;
ADOQuery1-> SQL-> Text= "Select * from ' " + ComboBox3-> Text+ " ' where No = " + Edit2-> Text;