PostgresDAC

TPSQLDatabase.Properties.TransactionStatus

Previous Next

Specifies the transaction status.

Syntax:

type
  TTransactionStatusType = (
	trstIDLE,	
	trstACTIVE,
	trstINTRANS,	
	trstINERROR,
	trstUNKNOWN);

property TransIsolation: TTransIsolation;

Description:

Use TransactionStatus to determine the transaction status. TransactionStatus can be any one of the three values summarized in the following table:

Transaction StatusMeaning
trstIDLEConnection idle.
trstACTIVECommand of SQL statement in progress.
trstINTRANSIdle, within transaction block.
trstINERRORIdle, within failed transaction.
trstUNKNOWNCannot determine status.
If you get trstINERROR result, then keep in mind that all SQL commands will fail until ROLLBACK or COMMIT will be executed. If you get trstUNKNOWN result, you are probably disconnected from server.