我做了如下,但运行不了:
with adoquery1 do
begin
active:=true;
close;
sql.clear;
sql.Add('select * from casestructure');
Sql.Add('where (hole between '''+strtofloat(edt_hole.Text)+''' and '''+strtofloat(edt_holea.Text)+''')');
prepared:=true;
open;
end;
with adoquery1 do
begin
active:=true;
close;
sql.clear;
sql.Add('select * from casestructure');
Sql.Add('where (hole between '''+strtofloat(edt_hole.Text)+''' and '''+strtofloat(edt_holea.Text)+''')');
prepared:=true;
open;
end;
解决方案 »
- 请问如何在form1上显示一个窗体,这个窗体能给拖动,但是不能拖到form1的外面
- DBGrid能不能实现将一个列对应的数据库中的值对应成其他值(内详)
- 怎么样压缩一个文件夹呢?
- 分不够,另外再加,只要能够解决问题,树的问题。
- 请教:FOXMAIL它是用数据库保存数据吗??
- ADO+ACCESS的SQL,解决立刻结贴;
- 哪位要吧提供active skin 4.2 或4.22的注册吗,谢谢!
- 双击treeview中的某项时,在右边的edit内容显示选中项的内容??在线等。
- ComboBox中如何把一天的時間段全部加進去呢(時間的間隔符是按系統來的)?
- delphi队列使用问题
- 回忆的心情
- 为什么tedit的selectall 属性没有效果?
也许就能看清楚什么毛病了。
Sql.Add('where hole between '+edt_hole.Text+' and '+edt_holea.Text);
//where 之前应加空格
Sql.Add('where hole >='+edt_hole.Text+' and <='+edt_holea.Text);
begin
close;
sql.clear;
sql.Add('select * from casestructure where hole between :holestr and :holeend');
Parameters.ParamByName('holestr').Value :=strtofloat(edt_hole.Text);
Parameters.ParamByName('holestr').Value :=strtofloat(edt_holea.Text);
open;
end;
begin
close;
sql.clear;
sql.Add('select * from casestructure where hole between :holestr and :holeend');
Parameters.ParamByName('holestr').Value :=strtofloat(edt_hole.Text);
Parameters.ParamByName('holeend').Value :=strtofloat(edt_holea.Text);
open;
end;
Sql.Add('where hole between '+edt_hole.Text+' and '+edt_holea.Text);
试试看