查詢多筆資料 |
尚未結案
|
suntao008
一般會員 ![]() ![]() 發表:70 回覆:38 積分:21 註冊:2003-10-19 發送簡訊給我 |
|
Fishman
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:120 回覆:1949 積分:2163 註冊:2006-10-28 發送簡訊給我 |
|
T.J.B
版主 ![]() ![]() ![]() ![]() ![]() 發表:29 回覆:532 積分:497 註冊:2002-08-14 發送簡訊給我 |
|
sl@cableplus.com.cn
高階會員 ![]() ![]() ![]() ![]() 發表:168 回覆:359 積分:130 註冊:2004-03-26 發送簡訊給我 |
|
mine
中階會員 ![]() ![]() ![]() 發表:28 回覆:129 積分:56 註冊:2004-03-31 發送簡訊給我 |
你說的意思是由使用者指定查詢條件?
例如
with ADOQuer1 do begin
close;sql.clear;
temp:='select * from test where sn in (';
if Edit1.text<> '' then
temp:=temp '''' Edit1.text '''';
if Edit2.Text <> '' then begin
temp:=temp ',''' Edit2.Text '''';
temp:=temp ')';
SQL.add(temp);
open;
end;
或者是? with ADOQuer1 do begin
close;sql.clear;
temp:='select * from test';
if Edit1.text<> '' then begin
if selectflag<>0 then
temp:=temp ' AND';
else
temp:=temp ' where';
temp:=temp ' sn=''' Edit1.text '''';
selectflag:=selectflag 1;
end;
if Edit2.Text <> '' then begin
if selectflag<>0 then
temp:=temp ' AND';
else
temp:=temp ' where';
temp:=temp ' DATA=''' Edit2.Text '''';
selectflag:=selectflag 1;
end;
SQL.add(temp);
open;
selectflag:=0;
end;
---------------------------------
搞不懂!搞不懂!永遠都搞不懂!! 發表人 - mine 於 2004/06/12 23:26:52
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |