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

關於 TQuery 的 UpdateMode 的解釋?

尚未結案
skurama
中階會員


發表:88
回覆:127
積分:73
註冊:2002-07-22

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-04-29 10:18:52 IP:61.219.xxx.xxx 未訂閱
在http://delphi.ktop.com.tw/topic.php?TOPIC_ID=21769 一篇中有看到說明 TQuery的UpdateMode的做用,大概如下 1.upWhereAll All columns (fields) are used to locate the record. 所有欄位都和修改前一樣,才作更新 2.upWhereChanged Only key field values and the original value of fields that have changed are used to find the record. 只要鍵值欄位及修改的欄位其值和修改前一樣,更作更新 3.upWhereKeyOnly Only key fields are used to find the record. 只要鍵值欄位都和修改前一樣,更作更新 三個都是說到要和修改前一樣,才作更新,可是和修改前一樣的話,那為什麼要做更新的動作。 Help是這樣寫 Description: Use UpdateMode to specify the criteria to use when locating a record in the dataset. UpdateMode specifies whether modified records are located based on all columns (fields), on only the key fields, or on the key fields plus the original values of fields that have been modified. 當在資料庫中指到一筆記錄時,UpdateMode用來說明使用的準則。 在資料集內,UpdateMode 說明在所有欄位, 在只有Key的欄位, 或在 Key 欄位和一般值的欄位被修改時,是否要去修改記錄。 感覺好像是說, 選擇upWhereAll 時,All columns (fields) are used to locate the record. 所有的欄位被使用去指向記錄 選擇upWhereChanged 時,Only key field values and the original value of fields that have changed are used to find the record. 當某一筆資料的鍵值或一般值被改時,去找到該資料。 選擇upWhereKeyOnly 時,Only key fields are used to find the record當鍵值被使用去找尋記錄時。 感覺直接翻又好像與該篇文章的內容不同。 請問UpdateMode和其三個選項真正的目的是要做什麼的? ---------------- 初出芧房程設師, 左鍵右鼠寫程式, 日扣夜寫眼框溼, 望能早成系分師。 ----------------
------
----------------
初出芧房程設師,
左鍵右鼠寫程式,
日扣夜寫眼框溼,
望能早成系分師。
----------------
系統時間:2024-07-01 18:46:53
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!