全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:876
推到 Plurk!
推到 Facebook!

More about ADOquery

尚未結案
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-04-04 00:21:59 IP:217.36.xxx.xxx 未訂閱
I put 'delete from [OrderItems]' into the SQL String. when I try to active it, it pops up a message: CommandText have no return result sets    What's that mean? Note: [OrderItems] is a tablename Plz help me, I am really running out of time.. sniff thanx for any kind people helping me
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-04-04 07:29:47 IP:202.39.xxx.xxx 未訂閱
看錯誤訊息 CommandText have no return result sets 說的 若您是用 TADOQuery 的話 執行的話得用 TADOQuery.EexcSQL; 而不是 TADOQuery.Open; --- 每個人都是一本書
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-04-04 08:42:51 IP:217.36.xxx.xxx 未訂閱
yes I did. I put: 'delete from [OrderItems]' into ADOQuery1, SQL Strings I want this sql occurs when the form show. show I put: ADOQuery1.EexcSQL; under FormShow However, this message pops up when I try to 'Active' the ADOQuery so, how can I execute the query is regardless at this point
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-04-04 08:50:31 IP:202.39.xxx.xxx 未訂閱
引言: yes I did. I put: 'delete from [OrderItems]' into ADOQuery1, SQL Strings I want this sql occurs when the form show. show I put: ADOQuery1.EexcSQL; under FormShow However, this message pops up when I try to 'Active' the ADOQuery so, how can I execute the query is regardless at this point
也不能用 TADOQuery.Active := True; 的方式. --- 每個人都是一本書
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-04-04 09:14:02 IP:217.36.xxx.xxx 未訂閱
so I just put ADOQuery1.EexcSQL into the events I want leave the ADOQuery unactive?
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-04-04 11:03:33 IP:202.39.xxx.xxx 未訂閱
引言: so I just put ADOQuery1.EexcSQL into the events I want leave the ADOQuery unactive?
是的, FormShow 事件中就放 ADOQuery1.ExecSQL; 即可. --- 每個人都是一本書
Justmade
版主


發表:94
回覆:1934
積分:2030
註冊:2003-03-12

發送簡訊給我
#7 引用回覆 回覆 發表時間:2003-04-04 11:38:44 IP:218.16.xxx.xxx 未訂閱
到現在還在問這個丫?    在兩天前不是說過 : To delete all records at once, it is easier with SQL statement    ADOQuery1.SQL.Text := 'delete from tablename'; ADOQuery1.ExecSQL;    It is fine to put the suggested code in the onShow event of your form.    昨天不是再 confirm 過嗎?    of casue you have to replace 'tablename' with your real table name    原來 1. 小弟的表達能力極差 2. 小弟說的不可信
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#8 引用回覆 回覆 發表時間:2003-04-04 17:22:07 IP:217.36.xxx.xxx 未訂閱
I don't know what to ask anymore... it just doesn't work.. plz.. can anyone add my ICQ: 67774170 and help me with the solution otherwise, I will just keep asking forever.. plz
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#9 引用回覆 回覆 發表時間:2003-04-04 18:07:45 IP:202.39.xxx.xxx 未訂閱
像這樣吧:
procedure TForm1.FormShow(Sender: TObject);
begin
  ADOQuery1.Close;
  ADOQuery1.SQL.Text := 'Delete From OrderItems';
  ADOQuery1.ExecSQL;
end;
--- 每個人都是一本書
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#10 引用回覆 回覆 發表時間:2003-04-04 18:15:23 IP:217.36.xxx.xxx 未訂閱
i have mention this so many times. I can't even 'ACTIVE' the ADOQuery it needs something to put in the SQL TSTring first, but whatever I put it just won't active
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#11 引用回覆 回覆 發表時間:2003-04-04 18:25:33 IP:202.39.xxx.xxx 未訂閱
引言: i have mention this so many times. I can't even 'ACTIVE' the ADOQuery it needs something to put in the SQL TSTring first, but whatever I put it just won't active
把你的專案上傳到會員求助區吧! --- 每個人都是一本書
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#12 引用回覆 回覆 發表時間:2003-04-04 18:39:59 IP:217.36.xxx.xxx 未訂閱
thnax.. i just feel so hopeless...
Justmade
版主


發表:94
回覆:1934
積分:2030
註冊:2003-03-12

發送簡訊給我
#13 引用回覆 回覆 發表時間:2003-04-04 19:04:39 IP:218.16.xxx.xxx 未訂閱
There is NO need to set active to true. Just those 2 lines will do the job fast and clean. Why so upset for some non-existence problem ? 菩提本無樹,明鏡亦非臺;本來無一物,何處染塵埃 施主是否過份執著了些?
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#14 引用回覆 回覆 發表時間:2003-04-04 19:27:15 IP:217.36.xxx.xxx 未訂閱
i placed these two lines into the 'Button Click' but it won't do anything
Justmade
版主


發表:94
回覆:1934
積分:2030
註冊:2003-03-12

發送簡訊給我
#15 引用回覆 回覆 發表時間:2003-04-04 19:36:22 IP:218.16.xxx.xxx 未訂閱
what you expect it to do ?
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#16 引用回覆 回覆 發表時間:2003-04-04 19:44:39 IP:217.36.xxx.xxx 未訂閱
u got a email? how about I sent u a screenshot so u can get a better picture of what I am trying to do?
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#17 引用回覆 回覆 發表時間:2003-04-04 19:51:31 IP:217.36.xxx.xxx 未訂閱
clear all record in 'Order Items' table of course
Justmade
版主


發表:94
回覆:1934
積分:2030
註冊:2003-03-12

發送簡訊給我
#18 引用回覆 回覆 發表時間:2003-04-04 19:52:31 IP:218.16.xxx.xxx 未訂閱
You think my questions is hard to answer ? Then I think you are confused. The SOLE function that two line do is to empty the table you specify in the tablename. Nothing less, nothing more. If you have some file to post, post here : http://delphi.ktop.com.tw/forum.asp?FORUM_ID=97 If you have some pict to show, put here : http://delphi.ktop.com.tw/forum.asp?FORUM_ID=130 and read this : http://delphi.ktop.com.tw/topic.php?TOPIC_ID=7332
Vashee
初階會員


發表:38
回覆:87
積分:25
註冊:2003-03-31

發送簡訊給我
#19 引用回覆 回覆 發表時間:2003-04-04 20:56:24 IP:217.36.xxx.xxx 未訂閱
i know it is simple procedure, but it just doesn't work i have got 3 nights extension on this thing, hopefully I can get everything finish
系統時間:2024-06-28 23:30:21
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!