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

DBEdit.Text 與 DBEdit.Field.Text 有什麼不同

缺席
christie
資深會員


發表:30
回覆:299
積分:475
註冊:2005-03-25

發送簡訊給我
#1 引用回覆 回覆 發表時間:2009-03-11 11:46:14 IP:59.125.xxx.xxx 訂閱
請問前輩們:

DBEdit9.Text 與 DBEdit9.Field.Text 有什麼不同, 使用的場合?

先謝謝囉!
------
What do we live for if not to make life less difficult for each other?
christie
資深會員


發表:30
回覆:299
積分:475
註冊:2005-03-25

發送簡訊給我
#2 引用回覆 回覆 發表時間:2009-03-12 08:21:25 IP:59.125.xxx.xxx 訂閱
看看Help: 
TDBEdit.Field
Specifies the TField object for the database field the edit box represents.

property Field: TField;

D e script i o n

Read Field to get direct access to the contents and properties of the database field without going through the edit window. Use Field to change the contents of the database field programmatically:

DBEdit1.Field.AsString := 'San Francisco Baking';

Use the Text property instead if you want to change the contents of the edit window without immediately posting the changes to the dataset. Changing the Text property allows the user to cancel the changes.
------
What do we live for if not to make life less difficult for each other?
編輯記錄
christie 重新編輯於 2009-03-12 08:23:38, 註解 無‧
christie 重新編輯於 2009-03-12 08:26:56, 註解 無‧
christie
資深會員


發表:30
回覆:299
積分:475
註冊:2005-03-25

發送簡訊給我
#3 引用回覆 回覆 發表時間:2009-03-12 09:02:55 IP:59.125.xxx.xxx 訂閱
是故 DBEdit1.Text 與 DBEdit1.Field.Text,
差別是 DBEdit1.Text 可以取消Cancel對Record所作的異動,
而DBEdit1.Field.Text 會直接填值到Record(無法還原),
除非不要Post.(包含 First, Last, Next, and Prior
)

===================引 用 christie 文 章===================
請問前輩們:

DBEdit9.Text 與 DBEdit9.Field.Text 有什麼不同, 使用的場合?

先謝謝囉!
------
What do we live for if not to make life less difficult for each other?
編輯記錄
christie 重新編輯於 2009-03-12 09:25:34, 註解 無‧
系統時間:2024-05-07 18:19:31
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!