How to use ADOQuery? |
尚未結案
|
Vashee
初階會員 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
I am using Delphi with Access DBase.
Can I set my own query in delphi or
I need to set up the query in Access, then use ADOQuery to link it.
Which way is better? Does query updates the database automatically? or I have to set a situation, like a algorithm to trigger the query? Thanks alot
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
Vashee
初階會員 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
引言: Then what's the different between ADODataset and ADOQuery? both need SQL syntex to work小弟都是用 TADOTable 與 TADOQuery 所以不知講得對不對? 看 help 中說的, 如果要回傳 result set 的 即 SQL 為 Select 的, 則用 TADODataset 如果沒回傳 result set的, 即 SQL 為 Insert/Update/Delete 類的 使用 TADOCommand 如果是 TADOQuery 的話, 則兩類都可使用 如果 SQL 是 Select 的話, 用 TADOQuery.Open; 如果 SQL 是 Insert/Update/Delete 的話, 用 TADOQuery.ExecSQL; --- 每個人都是一本書 |
Vashee
初階會員 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
引言: What is mean by 要回傳 result set ? can u give me an example?1.有回傳的 begin ADOQuery1.Connection := ADOConnection1; ADOQuery1.Close; ADOQuery1.SQL.Text ;= 'Select * From TableA'; ADOQuery1.Open; end;2.沒回傳的 begin ADOQuery1.Connection := ADOConnection1; ADOQuery1.Close; ADOQuery1.SQL.Text ;= 'Delete From TableA'; ADOQuery1.ExecSQL; end;--- 每個人都是一本書 |
Vashee
初階會員 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
Vashee
初階會員 發表:38 回覆:87 積分:25 註冊:2003-03-31 發送簡訊給我 |
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
引言: yes, i understand now. thnx do u know anywhere I can find all the 'coding' for SQL? any site, or online tutorial that teach u all the basic coding. like insert, delete all.. etc?這裏一個: http://www.w3schools.com/sql/default.asp --- 每個人都是一本書 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |