关于DELPHI的SQL语句的问题

zxfzyh 2002-03-11 05:54:21
下列的SQL语句有什么问题
query1.close;
query1.sql.clear;
query1.sql.add('select *from custom');
query1.sql.add('where name=edit1.text')

query1.sql.add('where name="赵永贺"');
query1.open;
系统提示“Invalid field name"
但在我的表中有“name"这个字段
请各位给我点帮助。谢谢
...全文
36 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
onice 2002-03-11
  • 打赏
  • 举报
回复
哈哈,贴错地方了吧~~
这是PB论坛哦~~
onice 2002-03-11
  • 打赏
  • 举报
回复
query1.sql.add('where custom.name='''+"赵永贺"+'''');
zhanwei 2002-03-11
  • 打赏
  • 举报
回复
query1.sql.add('where custom.name="赵永贺"');

401

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧