急,关于数据查询语句的问题(50分)

  • 主题发起人 pianzhen
  • 开始时间
P

pianzhen

Unregistered / Unconfirmed
GUEST, unregistred user!
research:=' and correspond.enttaxid = '''+edit1.Text +'';
adoquery1.sql.clear;
adoquery1.sql.add('select correspond.certificateid,correspond.enttaxid,qiyeinfo.*,correspond.state from correspond,qiyeinfo where correspond.certificateid=qiyeinfo.certificateid'+quotedstr(research));
adoquery1.sql.ExecSQL ;
执行以后,总是说'and correspond.enttaxid ='11'有错误,'11'为edit1.text的值,请高手指教
应如何修改这条查询语句。
多谢!!!
我的email地址为pianzhen@yahoo.com.cn
 
research:=' and correspond.enttaxid = '''+edit1.Text +'''';
 
research:=' and correspond.enttaxid = '''+edit1.Text +'''';
还是不行,提示'and correspond.enttaxid ='11''有错误
 
adoquery1.Close ;///////////////

research:=' and correspond.enttaxid = '''+edit1.Text +'''';
///
adoquery1.sql.clear;
adoquery1.sql.add('select correspond.certificateid,correspond.
enttaxid,qiyeinfo.*,correspond.state from correspond,qiyeinfo where correspond.certificateid=qiyeinfo.certificateid'
+research);
///////
adoquery1.Open ;
////
 
楼上的答对了,就是引号在作怪,你的quotedstr函数给字符串多加了一次引号
 
你真是高手,再次多谢你.为什么改为EXECSQL什么值都没有返回,
改为OPEN就返回正确值.
 
顶部