Reading values from an external file  Using the Preview tab to connect in a PocketBuilder application

Chapter 16: Using Transaction Objects

Connecting to the database

Once you establish the connection parameters by assigning values to the Transaction object properties, you can connect to the database using the SQL CONNECT statement:

// Transaction object values have been set.
CONNECT;

Because CONNECT is a SQL statement, not a PowerScript statement, you need to terminate it with a semicolon.

If you are using a Transaction object other than SQLCA, you must include the USING TransactionObject clause in the SQL syntax:

CONNECT USING TransactionObject;

For example:

CONNECT USING MyTrans;




Copyright © 2004. Sybase Inc. All rights reserved. Using the Preview tab to connect in a PocketBuilder application

View this book as PDF