線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1040
推到 Plurk!
推到 Facebook!

請教ADO之FilterGroup屬性值問題

尚未結案
cashxin2002
版主


發表:231
回覆:2555
積分:1937
註冊:2003-03-28

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-08-26 18:03:34 IP:202.62.xxx.xxx 未訂閱
請教各位前輩﹕    ADO的FilterGroup屬性中有個fgPredicate屬性值﹐其作用是只顯示剛被刪除的資料﹐但小弟在測試中點擊fgPredicate RadioButton時出現如下錯誤信息﹕ 引數中可能發生錯誤﹐超過可接受的定義範圍﹐或与其它引數發生沖突 請問該如何解決﹐還是小弟對在的理解有誤﹐相關程式碼如下﹕
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
  case TRadioButton(Sender).Tag of
  0: begin
       if ADODataSet1.LockType = ltBatchOptimistic then
         begin
           ADODataSet1.Filtered := True;
           ADODataSet1.FilterGroup := fgNone;
         end;
     end;
  1: begin
       if ADODataSet1.LockType = ltBatchOptimistic then
         begin
           ADODataSet1.Filtered := True;
           ADODataSet1.FilterGroup := fgPendingRecords;
         end;
     end;
  2: begin
       if ADODataSet1.LockType = ltBatchOptimistic then
         begin
           ADODataSet1.Filtered := True;
           ADODataSEt1.FilterGroup := fgAffectedRecords;
         end;
     end;
  3: begin
       if ADODataSet1.LockType = ltBatchOptimistic then
         begin
           ADODataSet1.Filtered := True;
           ADODataSet1.FilterGroup := fgFetchedRecords;
         end;
     end;
  4: begin
       if ADODataSet1.LockType = ltBatchOptimistic then
         begin
           ADODataSet1.Filtered := True;
           ADODataSet1.FilterGroup := fgPredicate;
         end;
     end;
  end;
end;
然后其余四個RadioButton元件共用RadioButton1的OnClick事件程式碼﹒ 謝謝﹗ ========================= 大病初愈﹐休養調整中... =========================
------
忻晟
系統時間:2024-06-29 22:58:52
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!