Transaction |
答題得分者是:Justmade
|
懷舊的人
高階會員 ![]() ![]() ![]() ![]() 發表:28 回覆:152 積分:141 註冊:2003-01-08 發送簡訊給我 |
|
Justmade
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:94 回覆:1934 積分:2030 註冊:2003-03-12 發送簡訊給我 |
dbExpress 及 ADO 均可以但也要看後台 Database 支不支援 以下節錄 Help File : StartTransaction method (TSQLConnection) Initiates a new transaction in the associated database. Delphi syntax: procedure StartTransaction(TransDesc: TTransactionDesc); Description Call StartTransaction to start a new transaction against a database server that supports transactions. (MySQL servers do not support transactions.) You can check the TransactionsSupported property to determine whether the server supports transactions. If the server does not support transactions, StartTransaction does nothing. TransDesc describes the transaction you are starting. It lets you specify A user-defined transaction identifier. If the server supports nested or overlapped transactions, you can initiate multiple transactions by calling StartTransaction and providing each transaction with its own unique identifier. The transaction isolation level. This indicates the degree to which this transaction can see?changes made by other transactions.
If the transaction is successfully started, StartTransaction sets the InTransaction property to true.
Updates, insertions, and deletions that take place after a call to StartTransaction are enlisted in that transaction until another overlapping transaction is started or until the application calls Commit to save the changes or Rollback to cancel them. Tip: If the server does not support multiple transactions, check the status of the InTransaction property to be sure that another transaction is not already in progress.
Tip: When working with overlapped transactions, you can indicate the transaction to which a dataset belongs by setting its TransactionLevel property to the transaction identifier you assign in this method. ------------------------------------ BeginTrans method (TADOConnection)
initiates a new transaction in the associated database. Delphi syntax: function BeginTrans: Integer; Description Call BeginTrans to start a new transaction in the data store the ADO connection component is connected to. BeginTrans returns a value of type integer, indicating the nesting level of the new transaction. A successful execution of BeginTrans triggers an OnBeginTransComplete event and sets the InTransaction property to true. Note: The ADO connection object must have an active connection before BeginTrans can be used.
|
channel
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:67 回覆:707 積分:854 註冊:2002-05-02 發送簡訊給我 |
|
懷舊的人
高階會員 ![]() ![]() ![]() ![]() 發表:28 回覆:152 積分:141 註冊:2003-01-08 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |