怎樣取得最新資科 |
尚未結案
|
homing
一般會員 發表:4 回覆:7 積分:2 註冊:2007-09-08 發送簡訊給我 |
請問以下程式有麼問題 ?
會在幾部機下運行 : under Delphi 7, WinXP, lan share ( using Paradox ) I face the problem is I cannot get the updated value from the database. Is it the cache problem of different PC ? How can fix it ? // my code is // table2.Refresh; if table2.FieldByName('AllowAddDN').AsBoolean = true then begin table2.Edit; table2.FieldByName('AllowAddDN').AsBoolean := false; table2.Post; table2.ApplyUpdates; table2.CommitUpdates; // only one person can do something here // table2.Edit; table2.FieldByName('AllowAddDN').AsBoolean := true; table2.Post; table2.ApplyUpdates; table2.CommitUpdates; end; |
lin
一般會員 發表:1 回覆:12 積分:7 註冊:2002-09-04 發送簡訊給我 |
|
homing
一般會員 發表:4 回覆:7 積分:2 註冊:2007-09-08 發送簡訊給我 |
|
myemail
一般會員 發表:1 回覆:6 積分:1 註冊:2007-01-11 發送簡訊給我 |
|
qqqufo
一般會員 發表:1 回覆:17 積分:8 註冊:2007-06-01 發送簡訊給我 |
===================引 用 homing 文 章=================== 請問以下程式有麼問題 ? 會在幾部機下運行 : under Delphi 7, WinXP, lan share ( using Paradox ) I face the problem is I cannot get the updated value from the database. Is it the cache problem of different PC ? How can fix it ? // my code is // table2.Refresh; if table2.FieldByName('AllowAddDN').AsBoolean = true then begin table2.Edit; table2.FieldByName('AllowAddDN').AsBoolean := false; table2.Post; table2.ApplyUpdates; table2.CommitUpdates; // only one person can do something here // table2.Edit; table2.FieldByName('AllowAddDN').AsBoolean := true; table2.Post; table2.ApplyUpdates; table2.CommitUpdates; end; table2.Refresh; // <-刷新数据 if table2.FieldByName('AllowAddDN').AsBoolean = true then // table2刚打开的时候是指向 BOF 的前一条,那个 table2.FieldByName('AllowAddDN').AsBoolean 应该恒false,也就是说,下面这一段程序根本没有执行,楼主可以在此处下个断点调试一下看不是如此。 解决的方法是在 table2.refresh后重新定位到需要的记录,再来 if |
canvas
一般會員 發表:6 回覆:21 積分:10 註冊:2004-01-25 發送簡訊給我 |
|
max5020
資深會員 發表:30 回覆:277 積分:321 註冊:2003-06-04 發送簡訊給我 |
|
Mickey
版主 發表:77 回覆:1882 積分:1390 註冊:2002-12-11 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |