About Transaction objects – PB Docs 125

About Transaction objects

In a PowerBuilder database connection, a Transaction
object
is a special nonvisual object that functions
as the communications area between a PowerBuilder application and
the database. The Transaction object specifies the parameters that
PowerBuilder uses to connect to a database. You must establish the
Transaction object before you can access the database from your
application, as shown in Figure 12-1:

Figure 12-1: Transaction object to access
database

datrn005.gif

Communicating with the database

In order for a PowerBuilder application to display and manipulate
data, the application must communicate with the database in which
the data resides.

proc.png To communicate with the database from your PowerBuilder
application:

  1. Assign the appropriate values to the Transaction
    object.

  2. Connect to the database.

  3. Assign the Transaction object to the DataWindow
    control.

  4. Perform the database processing.

  5. Disconnect from the database.

For information about setting the Transaction
object for a DataWindow control and using the DataWindow to retrieve
and update data, see the DataWindow Programmers Guide.

Default Transaction object

When you start executing an application, PowerBuilder creates
a global default Transaction object named SQLCA (SQL Communications Area). You can
use this default Transaction object in your application or define
additional Transaction objects if your application has multiple
database connections.

Transaction object properties

Each Transaction object has 15 properties, of which:

  • Ten are used to connect to
    the database.

  • Five are used to receive status information from
    the database about the success or failure of each database operation.
    (These error-checking properties all begin with SQL.)


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x