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

有關於bcb 6.0的DBNavigator的問題

答題得分者是:GrandRURU
huang_ying_ming
一般會員


發表:10
回覆:14
積分:4
註冊:2009-08-21

發送簡訊給我
#1 引用回覆 回覆 發表時間:2009-09-01 08:58:23 IP:140.130.xxx.xxx 訂閱
DBNavigator一定要先編輯才能新增到資料庫嗎?他可以自動新增到資料庫嗎
我目前有台機器,透過bcb 6.0可以讀到值,可是讀到的值又如何在DBNavigator上面顯示呢
請教一下各位前輩
GrandRURU
站務副站長


發表:240
回覆:1680
積分:1874
註冊:2005-06-21

發送簡訊給我
#2 引用回覆 回覆 發表時間:2009-09-01 09:55:32 IP:203.75.xxx.xxx 未訂閱
DBNavigator是負責控制資料集的指標(移動到最前、最後一筆、前一筆、後一筆)以及對指向的資料列(ROW)進行修改、新增、刪除的工作
顯示是由其它可視化元件,如DBEdit、DBGrid等來進行顯示。

從新增動作到資料庫的行為是由DBNavigator發動,將變動/新增的資料傳送到DataSet中,再由ADO元件送至資料庫中,其間的過程皆是自動處理(因AutoCommit預設為True),不知你要在DBNavigator上顯示什麼呢?

===================引 用 huang_ying_ming 文 章===================
DBNavigator一定要先編輯才能新增到資料庫嗎?他可以自動新增到資料庫嗎
我目前有台機器,透過bcb 6.0可以讀到值,可是讀到的值又如何在DBNavigator上面顯示呢
請教一下各位前輩
huang_ying_ming
一般會員


發表:10
回覆:14
積分:4
註冊:2009-08-21

發送簡訊給我
#3 引用回覆 回覆 發表時間:2009-09-01 12:08:50 IP:140.130.xxx.xxx 訂閱
DBavigator設定欄位值,並不是透過讀取mysql取到的值,而是透過RFID讀取到的值放在變數中,並且把變數的值放到DBavigator的特地欄位,請問一下有DBEdit、DBGrid實際操作方式嗎?
簡單來說就是DBavigator能取到變數值放在他的攔位上
===================引 用 GrandRURU 文 章===================
DBNavigator是負責控制資料集的指標(移動到最前、最後一筆、前一筆、後一筆)以及對指向的資料列(ROW)進行修改、新增、刪除的工作
顯示是由其它可視化元件,如DBEdit、DBGrid等來進行顯示。

從新增動作到資料庫的行為是由DBNavigator發動,將變動/新增的資料傳送到DataSet中,再由ADO元件送至資料庫中,其間的過程皆是自動處理(因AutoCommit預設為True),不知你要在DBNavigator上顯示什麼呢?
編輯記錄
huang_ying_ming 重新編輯於 2009-09-01 12:11:01, 註解 無‧
GrandRURU
站務副站長


發表:240
回覆:1680
積分:1874
註冊:2005-06-21

發送簡訊給我
#4 引用回覆 回覆 發表時間:2009-09-01 12:46:23 IP:203.75.xxx.xxx 未訂閱
DBNavigator有這樣的功能哦!我還是第一次聽到

Borland C Builder 6 and MySQL database

這是一篇有關BCB mysql的簡單教學,你看一下吧

===================引 用 huang_ying_ming 文 章===================
DBavigator設定欄位值,並不是透過讀取mysql取到的值,而是透過RFID讀取到的值放在變數中,並且把變數的值放到DBavigator的特地欄位,請問一下有DBEdit、DBGrid實際操作方式嗎?
簡單來說就是DBavigator能取到變數值放在他的攔位上

huang_ying_ming
一般會員


發表:10
回覆:14
積分:4
註冊:2009-08-21

發送簡訊給我
#5 引用回覆 回覆 發表時間:2009-09-01 13:05:40 IP:140.130.xxx.xxx 訂閱
DBNavigator的問題真的沒辦法去到變數的值喔= =慘了 那還有其他辦法讀取變數的值且還可以存到MYSQL資料庫
或者DBNavigator有什麼函式可以取道變數的直
===================引 用 GrandRURU 文 章===================
DBNavigator有這樣的功能哦!我還是第一次聽到

Borland C Builder 6 and MySQL database

這是一篇有關BCB mysql的簡單教學,你看一下吧



編輯記錄
huang_ying_ming 重新編輯於 2009-09-01 13:12:32, 註解 無‧
huang_ying_ming 重新編輯於 2009-09-01 13:21:30, 註解 無‧
GrandRURU
站務副站長


發表:240
回覆:1680
積分:1874
註冊:2005-06-21

發送簡訊給我
#6 引用回覆 回覆 發表時間:2009-09-01 13:35:32 IP:203.75.xxx.xxx 未訂閱
你的RFID裝置應該也是接到USB或是RS-232吧
那就設定一個任意變數來接送來的值,再傳到ADOTABLE就可以啦

語法應該會像是:
ADOTable1->Append();
ADOTable1->FieldbyName("EmpId")->AsString = 變數x;
ADOTable1->Post();

所以你的問題應該是與DBNavigator無關,離題了。
其它,你可以再研究一下書本上的內容
C Builder 資料庫程式設計 楊宗誌著
這本書有大量關於bcb ado的設計方法,你可以去圖書館借借看。
huang_ying_ming
一般會員


發表:10
回覆:14
積分:4
註冊:2009-08-21

發送簡訊給我
#7 引用回覆 回覆 發表時間:2009-09-01 16:17:36 IP:140.130.xxx.xxx 訂閱
請問一下那個Append();是做什麼用的
===================引 用 GrandRURU 文 章===================
你的RFID裝置應該也是接到USB或是RS-232吧
那就設定一個任意變數來接送來的值,再傳到ADOTABLE就可以啦

語法應該會像是:
ADOTable1->Append();
ADOTable1->FieldbyName("EmpId")->AsString = 變數x;
ADOTable1->Post();

所以你的問題應該是與DBNavigator無關,離題了。
其它,你可以再研究一下書本上的內容
C Builder 資料庫程式設計 楊宗誌著
這本書有大量關於bcb ado的設計方法,你可以去圖書館借借看。
GrandRURU
站務副站長


發表:240
回覆:1680
積分:1874
註冊:2005-06-21

發送簡訊給我
#8 引用回覆 回覆 發表時間:2009-09-02 09:56:45 IP:203.75.xxx.xxx 未訂閱
請詳見你的Help, 離題再+1
Adds a new, empty record to the end of the dataset.

void __fastcall Append(void);

Description

For datasets that permit editing, call Append to:

1 Open a new, empty record at the end of the dataset.
2 Set the active record to the new record.

After a call to Append, an application can enable users to enter data in the fields of the record, and can then post those changes to the database or change log using Post (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) A newly appended record is posted to the database in one of three ways:

For indexed Paradox and dBASE tables, the record is inserted into the dataset in a position based on its index.
For unindexed Paradox and dBASE tables, the record is added to the end of the dataset.
For SQL databases, the physical location of the appended record is implementation-specific. For indexed tables, the index is updated with the new record information.
===================引 用 huang_ying_ming 文 章===================
請問一下那個Append();是做什麼用的
huang_ying_ming
一般會員


發表:10
回覆:14
積分:4
註冊:2009-08-21

發送簡訊給我
#9 引用回覆 回覆 發表時間:2009-09-03 12:55:53 IP:140.130.xxx.xxx 訂閱
我翻譯這段文字,這段意思是說Append()是更新資料庫的意思嗎?
===================引 用 GrandRURU 文 章===================
請詳見你的Help, 離題再 1
Adds a new, empty record to the end of the dataset.

void __fastcall Append(void);

Description

For datasets that permit editing, call Append to:

1 Open a new, empty record at the end of the dataset.
2 Set the active record to the new record.

After a call to Append, an application can enable users to enter data in the fields of the record, and can then post those changes to the database or change log using Post (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) A newly appended record is posted to the database in one of three ways:

For indexed Paradox and dBASE tables, the record is inserted into the dataset in a position based on its index.
For unindexed Paradox and dBASE tables, the record is added to the end of the dataset.
For SQL databases, the physical location of the appended record is implementation-specific. For indexed tables, the index is updated with the new record information.


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