2010/11/27

[Interbase / Firebird] Transaction只能在Client端被觸發

出處:(interbase之八) interbase的事務處理


心得:

最近被Firebird搞得很累,小小紀錄一下


此外, 搭配DBX的玩法很多變化,如果弄得不好,不是程式出錯就是資料庫跳出例外...

首先,DBX的SQLConnection彼此間的Transaction互不相識,在多人環境下驗證交易麻煩可多了

另外,Update會牽扯到 a row lock 或  Table lock......

Interbase官網提到了這方面的訊息:
How to Lock a Record in InterBase/Firebird

Firebird官網的FAQ:
How to lock records in a table?
Understanding the WITH LOCK clause
How to update multiple columns of one table using values from another table?

會提出這種問題,應該Default是Lock Table吧。

FAQ的最後一句話還蠻好笑的:
Use it only if you're really sure you know what you are doing and why. 
除非你知道你在做什麼,還有為什麼要使用它

看來,連官網也認為這東西不要輕言使用啊。

沒有留言:

張貼留言