VFP 愛用者社區 首頁 VFP 愛用者社區
本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入

CA環境如何做交易異動處理

 
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
walter_yang



註冊時間: 2004-10-18
文章: 17


第 1 樓

發表發表於: 星期一 十一月 14, 2005 11:22 am    文章主題: CA環境如何做交易異動處理 引言回覆

小弟有二個問題想請教,在VFP + SQL 2000下用ADO建立CA的資料環境下VFP如何調用SQL Server中已經寫好的Store Procedure,另外使用CA時該如何手動控制Transaction,可否提供簡單的程式碼做參考!謝謝

walter_yang 在 星期二 十一月 15, 2005 12:17 pm 作了第 2 次修改
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件
syntech



註冊時間: 2003-05-16
文章: 4249
來自: Taipei,Taiwan

第 2 樓

發表發表於: 星期一 十一月 14, 2005 11:47 am    文章主題: 引言回覆

一般使用SQL Server後端資料庫,
會使用手動方式進入交易模式,
如果你沒有作手動方式進入交易模式,
預設就是每個table自己單獨進交易模式.

還有,我記得Begin Transaction......End Transaction只對table有效,
對遠端無效

_________________
如果公司有下列困擾:
1. 找不到便宜,快速,簡易的 生產排程軟體
2. 不知道如何快速排定 採購計劃
3. 成本抓不準,自己算比軟體算有用
4. 想學習系統規劃,想找系統架構的顧問

請聯絡我們,也許我們幫得上忙
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 AIM Address
syntech



註冊時間: 2003-05-16
文章: 4249
來自: Taipei,Taiwan

第 3 樓

發表發表於: 星期五 十一月 25, 2005 3:04 pm    文章主題: 引言回覆

from MSDN

------------------
Visual FoxPro 9.0
How to: Control Transactions Manually

If you want to control transactions manually, you can set the Transactions property to 2, or DB_TRANSMANUAL. With manual transaction handling, Visual FoxPro automatically begins a transaction for you when you issue the first data-writing SQL statement, but you must submit the Visual FoxPro SQLCOMMIT( ) or SQLROLLBACK( ) functions to end the transaction. For the CursorAdapter object, you can set the UseTransactions property to false (.F.) and the CursorAdapter does not use transactions to send Insert, Update, or Delete commands.

To use manual transaction mode
Use the DBSETPROP( ) Function to set the Transactions property on the connection to 2 or DB_TRANSMANUAL.

-or-

Use the SQLSETPROP( ) Function to set the Transactions property on the active connection to 2 or DB_TRANSMANUAL.

Transaction processing is handled manually through SQLCOMMIT( ) FunctionSQLCOMMIT( ) Functionand SQLROLLBACK( ) Function.

After committing or rolling back the prior transaction, Visual FoxPro automatically begins a new transaction when you issue the next data-writing SQL statement. For more information about transactions, see Programming for Shared Access.

Visual FoxPro supports transactions nested up to five levels for local data. A single level of transaction support is built into SQL pass-through.

If your server supports multiple levels of transactions, you can use SQL pass-through to manage transaction levels explicitly. Explicit transaction management is complex, however, because it can be difficult to control the interaction between the built-in transaction and the timing of remote server transactions. For more information on explicit transaction management, see your ODBC documentation.

_________________
如果公司有下列困擾:
1. 找不到便宜,快速,簡易的 生產排程軟體
2. 不知道如何快速排定 採購計劃
3. 成本抓不準,自己算比軟體算有用
4. 想學習系統規劃,想找系統架構的顧問

請聯絡我們,也許我們幫得上忙
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 AIM Address
syntech



註冊時間: 2003-05-16
文章: 4249
來自: Taipei,Taiwan

第 4 樓

發表發表於: 星期五 十一月 25, 2005 3:12 pm    文章主題: 引言回覆

所以依MSDN內容來看,
就是先把 CursorAdapter.UseTransactions 設為 .F.,
然後依 SPT 的方式操作.

_________________
如果公司有下列困擾:
1. 找不到便宜,快速,簡易的 生產排程軟體
2. 不知道如何快速排定 採購計劃
3. 成本抓不準,自己算比軟體算有用
4. 想學習系統規劃,想找系統架構的顧問

請聯絡我們,也許我們幫得上忙
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 AIM Address
syntech



註冊時間: 2003-05-16
文章: 4249
來自: Taipei,Taiwan

第 5 樓

發表發表於: 星期五 十一月 25, 2005 3:14 pm    文章主題: 引言回覆

"Begin Transaction......End Transaction只對table有效, 對遠端無效 "

MSDN 說,對CursorAdapter仍然有效,但是我沒有測試.

_________________
如果公司有下列困擾:
1. 找不到便宜,快速,簡易的 生產排程軟體
2. 不知道如何快速排定 採購計劃
3. 成本抓不準,自己算比軟體算有用
4. 想學習系統規劃,想找系統架構的顧問

請聯絡我們,也許我們幫得上忙
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 AIM Address
從之前的文章開始顯示:   
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
無法 在這個版面附加檔案
無法 在這個版面下載檔案


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作