The Transaction object specifies the parameters that PowerBuilder uses to connect to a database.
You can customize your own version of the Transaction object by defining a class user object inherited from the built-in Transaction object.
For more information about creating a custom Transaction object, see the chapter on user objects in the PowerBuilder Users Guide.
For more information about using the Transaction object in an application, see Application Techniques.
| Transaction property | Datatype | Description | 
|---|---|---|
| AutoCommit | Boolean | The automatic commit indicator. Values are: 
 
 | 
| ClassDefinition | PowerObject | An object of type PowerObject containing information about the class definition of the object or control. | 
| Database | String | The name of the database with which you are connecting. | 
| DBMS | String | PowerBuilder vendor identifier. | 
| DBParm | String | DBMS-specific parameters. | 
| DBPass | String | The password used to connect to the database. | 
| Lock | String | The isolation level. | 
| LogID | String | The name or ID of the user who logs in to the server. | 
| LogPass | String | The password used to log in to the server. | 
| ServerName | String | The name of the server on which the database resides. | 
| SQLCode | Long | The success or failure code of the most recent operation. Return codes: 
 
 | 
| SQLDBCode | Long | The database vendor’s error code. | 
| SQLErrText | String | The database vendor’s error message. | 
| SQLNRows | Long | The number of rows affected (the database vendor supplies this number, so the meaning might not be the same in every DBMS) | 
| SQLReturnData | String | DBMS-specific information | 
| UserID | String | The name or ID of the user who will connect to the database | 
| Transaction event | Occurs | 
|---|---|
| When the user object is created | |
| When an Oracle 10g server sends a notification that a database operation has occurred | |
| When a database error occurs in the transaction | |
| When the user object is destroyed | |
| Occurs immediately before a SQL statement is submitted to the DBMS | 
| Transaction function | Datatype returned | Description | 
|---|---|---|
| String | Returns the name assigned to the user object | |
| Long | Returns the handle for your DBMS | |
| Integer | Creates a reference to a context-specific instance of the specified service | |
| PowerObject | Returns a reference to the name of the parent object | |
| Boolean | Adds an event to the end of the message queue of the user object | |
| String | Generates DataWindow source code based on a SQL SELECT statement | |
| Integer | Sends an event to the user object and executes the script associated with the event | |
| Object | Returns the type of the user object |