Committing updates to the database – PB Docs 125

Committing updates to the database

When a Pipeline object executes, it commits updates to the
destination table according to your specifications in the Data Pipeline
painter. You do not need to write any COMMIT statements
in your application’s scripts (unless you specified the
value None for the Pipeline object’s
Commit property).

Example

For instance, both of the Pipeline objects in the order entry
application (pipe_sales_extract1 and pipe_sales_extract2)
are defined in the Data Pipeline painter to commit all rows.
As a result, the Start function (or the Repair function)
will pipe every appropriate row and then issue a commit.

You might want instead to define a Pipeline object that periodically issues commits
as rows are being piped, such as after every 10 or 100 rows.

If the Cancel function is called

A related topic is what happens with committing if your application
calls the Cancel function to stop a pipeline
that is currently executing. In this case too, the Commit property
in the Data Pipeline painter determines what to do, as shown in Table 17-3.

Table 17-3: Commit property values

If
your Commit value is

Then
Cancel does this

All

Rolls back every row that was piped by
the current Start function (or Repair function)

A particular number of rows (such as 1, 10,
or 100)

Commits every row that was piped up to
the moment of cancellation

This is the same commit/rollback behavior that occurs
when a pipeline reaches its Max Errors limit (which is also specified
in the Data Pipeline painter).

For more information on controlling commits
and rollbacks for a Pipeline object, see the PowerBuilder Users
Guide
.


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