quy_wspfl.Close;
quy_wspfl.SQL.Clear;
quy_wspfl.SQL.Add('select wspfl form wspf where id in(select id from djnd where djnd like "%'+edit1.Text+'%")');
quy_wspfl.Open;另外,我有没有必要加入prepare若有请告诉我为什么,prepare怎么用是不是下次用quy_wspfl时还要if not quy_wspf.prepare then 是么?子查询在delphi中用什么格式,up有分!!
quy_wspfl.SQL.Clear;
quy_wspfl.SQL.Add('select wspfl form wspf where id in(select id from djnd where djnd like "%'+edit1.Text+'%")');
quy_wspfl.Open;另外,我有没有必要加入prepare若有请告诉我为什么,prepare怎么用是不是下次用quy_wspfl时还要if not quy_wspf.prepare then 是么?子查询在delphi中用什么格式,up有分!!
解决方案 »
- 画标尺,刻度用毫米单位,请问如何做到不受分辨率影响?
- 请教SGIP1.2的问题!
- 把cxGrid里面的一个字段的Properties属性设为ComboBox,如何在代码里动态往这个ComboBox里填加值
- MM,有个难题急需解决(关于 DateTimePicker控件的)
- JAVA高手请回答,Jave图片特技功能能加入到Delphi exe里吗?
- 用idhttp怎么实现对IIS的mime文件类型的新增啊
- 怎样给窗体设置一个背景图片?
- 如何通过程序动态设置默认打印机
- 请问如何获取指定文件夹的大小?
- 〖调查〗提议成立“中国软件联盟股份有限公司”!赞成者请如实估价报名参加。
- 怎么把用canvas画的图形,不放在from上,放在另外的控件上呢?
- 请问各位,如何在光标处插入字符?
如果说你的sql是这样的quy_wspfl.SQL.Add('select wspfl form wspf where id in(select id from djnd where djnd like :djnd)');
Quy_wspfl.paramByName('djnd').asstring:= edit1.text;
那么,我就认为有必要用prepare!
届时,仁兄后悔晚已!!!
用setparameter方法执行
如果你上面的查询是多次open,就不需每次都prepare
prepare是在你第一次用时让bde分配资源用的
upprepare是释放资源
现在地球人都用ado了,呵呵