Description of Transaction object properties

Table 16-1 describes each Transaction object property. For each of the connection properties, the table also lists the equivalent field in the Database Profile Setup dialog box that you complete to create a database profile in the PocketBuilder development environment.

Table 16-1: Transaction object properties

Property

Datatype

Description

In a database profile

DBMS

String

The three- or four-letter DBMS identifier for your connection. For SQL Anywhere, this is ODB. For UltraLite 9.x, it is UL9. For UltraLite 10.x, it is UL10.

Defined when you select a database interface

UserID

String

The name or ID of the user who connects to the database. UserID is optional for ODBC. (Be careful specifying the UserID property; it overrides the connection’s UserName property returned by the ODBC SQLGetInfo call.)

User ID

Lock

String

For DBMSs that support the use of lock values and isolation levels, the isolation level to use when you connect to the database. For information about the lock values you can set, see Lock in the PocketBuilder Connection Reference.

Isolation Level

LogID

String

The name or ID of the user who logs in to the database server. PocketBuilder uses the LogID and LogPass properties only if the ODBC driver does not support the SQL driver CONNECT call.

LogPass

String

The password used to log in to the database server.

AutoCommit

Boolean

Specifies whether PocketBuilder issues SQL statements outside or inside the scope of a transaction. Values you can set are:

  • True – PocketBuilder issues SQL statements outside the scope of a transaction; that is, the statements are not part of a logical unit of work (LUW). If the SQL statement succeeds, the DBMS updates the database immediately as if a COMMIT statement had been issued.

  • False (Default) – PocketBuilder issues SQL statements inside the scope of a transaction. PocketBuilder issues a BEGIN TRANSACTION statement at the start of the connection. In addition, PocketBuilder issues another BEGIN TRANSACTION statement after each COMMIT or ROLLBACK statement is issued.

When you connect to an UltraLite database in the development environment, all processing in painters takes place as if AutoCommit is set to true.

For more information, see AutoCommit in the Connection Reference.

AutoCommit Mode

DBParm

String

Contains connection parameters that support particular DBMS features. For a description of each DBParm parameter that PocketBuilder supports, see the Connection Reference.

Various

SQLReturnData

String

Contains DBMS-specific information.

SQLCode

Long

The success or failure code of the most recent SQL operation. For details, see “Error handling after a SQL statement”.

SQLNRows

Long

The number of rows affected by the most recent SQL operation. The database vendor supplies this number, so the meaning may be different for each DBMS.

SQLDBCode

Long

The database vendor’s error code. For details, see “Error handling after a SQL statement”.

SQLErrText

String

The text of the database vendor’s error message corresponding to the error code. For details, see “Error handling after a SQL statement”.