ADOQuery3_shouhuo.Close;
ADOQuery3_shouhuo.SQL.Clear;
ADOQuery3_shouhuo.SQL.Add('select * from shosetb where s_id='+''''+edit1.Text+'''');
ADOQuery3_shouhuo.SQL.Add(' and size='+''''+ComboBox3.Text+'''');
ADOQuery3_shouhuo.Open;上面代码实现功能:
在edit1.Text,ComboBox3.Text中输入内容,查询同时满足条件的纪录,但上述代码编译出错,请指教,谢谢!错误提示信息:“未指定的错误”
ADOQuery3_shouhuo.SQL.Clear;
ADOQuery3_shouhuo.SQL.Add('select * from shosetb where s_id='+''''+edit1.Text+'''');
ADOQuery3_shouhuo.SQL.Add(' and size='+''''+ComboBox3.Text+'''');
ADOQuery3_shouhuo.Open;上面代码实现功能:
在edit1.Text,ComboBox3.Text中输入内容,查询同时满足条件的纪录,但上述代码编译出错,请指教,谢谢!错误提示信息:“未指定的错误”
解决方案 »
- tesseract3.01训练的问题
- 高手进,我有一个P2p的类QQ的源码。但有很多控件需要导入,能全部帮忙编译通过的。本人奖赠送该源码一套
- 用Delphi 怎么做OutLook里.收件人一栏的效果?
- 请问DBGRID中的picklist怎么用?
- 找Delphi高手帮忙QQ:25160698
- 局域网IP地址监测
- 给我qq的窗体拖到屏幕边缘的自动缩放的代码,我就给分!
- 用adoquery联表,请问"删除"按钮怎么写呀!!
- 一个关于setwindowlong的问题????
- 如何使用TClientDataset中的aggregate
- 利用程式开启excel以后,怎么excel档案就打不开呢?
- CRC16校验 请高手指教~~
ADOQuery3_shouhuo.SQL.Clear;
ADOQuery3_shouhuo.SQL.Add('select * from shosetb where s_id='+edit1.Text);
ADOQuery3_shouhuo.SQL.Add(' and size='+ComboBox3.Text);
ADOQuery3_shouhuo.Open;
ADOQuery3_shouhuo.SQL.Add('select * from shosetb where s_id='''+edit1.Text+''' ');
ADOQuery3_shouhuo.SQL.Add(' and size='''+ComboBox3.Text+'''');
ADOQuery3_shouhuo.SQL.Clear;
ADOQuery3_shouhuo.SQL.Add(' select * from shosetb where s_id='''+ trim(edit1.Text)+''' ');
ADOQuery3_shouhuo.SQL.Add(' and size='''+ trim(ComboBox3.Text)+''' ');
ADOQuery3_shouhuo.open;
如:
SQLtxt=Update DemoTable Set UserName='%S' Where id=%S然后再程序中加载的时候:
用Format格式化即可。这样就不会出错的,
const sql:string = 'Update DemoTable Set UserName=%s Where id=%S';
begin
qry1.close;
qry1.sql.text:= format(sql,[quotedStr(str1),quotedStr(str2)]);
qry1.execute;
end;