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

怎樣取得最新資科

尚未結案
homing
一般會員


發表:4
回覆:7
積分:2
註冊:2007-09-08

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-09-08 19:20:19 IP:61.10.xxx.xxx 訂閱
請問以下程式有麼問題 ?
會在幾部機下運行 : 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

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-09-09 10:39:16 IP:59.125.xxx.xxx 訂閱
Paradox
在bde Administrator中的NET DIR (CONFIGRATOR->DRIVERS->NATIVE->Paradox)設定一個URL型PATH
也就是網路共用,註所有工作端要一樣

------
homing
一般會員


發表:4
回覆:7
積分:2
註冊:2007-09-08

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-09-09 10:55:13 IP:61.10.xxx.xxx 訂閱
net dir 已設計好
myemail
一般會員


發表:1
回覆:6
積分:1
註冊:2007-01-11

發送簡訊給我
#4 引用回覆 回覆 發表時間:2007-09-21 13:22:10 IP:220.134.xxx.xxx 訂閱
Paradox設Cache有意義嗎? 
qqqufo
一般會員


發表:1
回覆:17
積分:8
註冊:2007-06-01

發送簡訊給我
#5 引用回覆 回覆 發表時間:2007-09-24 17:24:41 IP:218.85.xxx.xxx 訂閱

===================引 用 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

發送簡訊給我
#6 引用回覆 回覆 發表時間:2007-09-27 22:29:17 IP:220.132.xxx.xxx 訂閱
如果是在網路上共用, 應該多多少少有點意義吧

===================引 用 myemail 文 章===================
Paradox設Cache有意義嗎?
max5020
資深會員


發表:30
回覆:277
積分:321
註冊:2003-06-04

發送簡訊給我
#7 引用回覆 回覆 發表時間:2007-10-11 14:55:51 IP:59.120.xxx.xxx 訂閱
真心建議,
多人環境操作,
不要使用Paradox,
如果是經費考量,
可使用My-SQL這類的DB,
不然會有很多程式控制不到的意外!!
Mickey
版主


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

發送簡訊給我
#8 引用回覆 回覆 發表時間:2007-10-24 08:56:55 IP:218.163.xxx.xxx 訂閱
你好:

我想...你是需要 DB Server 被 PC1 異動後...通知 PC2..執行 Refresh / Reopen.

DB Server 通知 PC2 ? 或由PC 1 通知PC2 ? 還是 PC2 "定時"重新取 ?
應用 Indy 網路元件...利用 UDP 的廣播功能(由PC 1 通知PC2)

http://delphi.ktop.com.tw/board.php?cid=31&fid=79&tid=26355
參考參考.
系統時間:2024-05-17 14:20:21
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!