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

在C / S 中怎樣實現分批取得資料 ?

尚未結案
dialog
一般會員


發表:33
回覆:18
積分:10
註冊:2002-09-07

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-09-09 20:39:00 IP:219.133.xxx.xxx 未訂閱
在兩層中,用AdoQuery查詢時,怎樣分批取得資料? 就像用ClientDataSet1.PacketRecords:=10 一樣,當記錄到最後時,dbgrid1點擊滾動按扭就會多取10筆記錄。
Mickey
版主


發表:77
回覆:1882
積分:1390
註冊:2002-12-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-09-09 21:48:42 IP:218.32.xxx.xxx 未訂閱
節錄一段 ADOQuery.CacheSize Property 線上說明 : Set CacheSize to control how many rows the ADO datasets provider keeps cached in its buffer and how many to retrieve at one time into local memory. Default value of CacheSize is 1 and the minimum allowed value is 1. For example, if CacheSize is set to 20, when the dataset is first activated the associated provider retrieves the first 20 rows into local memory. As the row pointer is moved through this recordset, the provider retrieves the data from the local memory buffer. If the datasets row pointer moves beyond the last of these 20 buffered rows, the provider retrieves the next 20. CacheSize represents the maximum number of rows to retrieve at one time. If the number of rows remaining to be retrieved is less than CacheSize, the remaining rows are retrieved and no exception is raised. The number of rows that can be returned by the provider can be less than all of the rows if the ADO dataset components MaxRecords property is set to other than the default (all rows).
dialog
一般會員


發表:33
回覆:18
積分:10
註冊:2002-09-07

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-09-10 14:49:15 IP:218.18.xxx.xxx 未訂閱
已經設定 AdoQuery1.CacheSize:=10; 但是AdoQuery1.open後還是一次把所有的資料全部取出來了
系統時間:2024-05-21 0:24:51
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!