Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Connection events – PB Docs 150 – PowerBuilder Library

Connection events – PB Docs 150

Connection events

At the connection level, the sequence of major events is as
follows:

When a synchronization request occurs, the begin_connection event
is fired. When all synchronization requests for the current script
version have been completed, the end_connection event
is fired. Typically you place initialization and cleanup code in
the scripts for these events, such as variable declaration and database
cleanup.

Apart from begin_connection and end_connection,
all of these events take the MobiLink user name stored in the ml_user table
in the consolidated database as a parameter. You can use parameters
in your scripts by placing question marks where the parameter value
should be substituted.

To make scripts in SQL Anywhere databases easier to read,
you might declare a variable in the begin_connection script,
then set it to the value of ml_username in
the begin_synchronization script.

For example, in begin_connection:

In begin_synchronization:

The begin_synchronization and end_synchronization events
are fired before and after changes are applied to the remote and
consolidated databases.

The begin_upload event marks the
beginning of the upload transaction. Applicable inserts and updates
to the consolidated database are performed for all remote tables,
then rows are deleted as applicable for all remote tables. After end_upload,
upload changes are committed.

If you do not want to delete rows from the consolidated database,
do not write scripts for the upload_delete event,
or use the STOP SYNCHRONIZATION DELETE statement
in your PowerScript code. For more information, see “Deleting rows from the remote
database only”
.

The begin_download event marks
the beginning of the download transaction. Applicable deletes are
performed for all remote tables, and then rows are added as applicable
for all remote tables in the download_cursor.
After end_download, download changes
are committed. These events have the date of the last download as
a parameter.

Other connection-level events can also occur, such as handle_error, report_error,
and synchronization_statistics. For
a complete list of events and examples of their use, see the chapter
on synchronization events in the MobiLink Administration
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