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

Starting JDBC Driver Manager Trace in a PowerBuilder application – PB Docs 2018 – PowerBuilder Library

Starting JDBC Driver Manager Trace in a PowerBuilder application – PB Docs 2018

Starting JDBC Driver Manager Trace in a PowerBuilder
application

To start JDBC Driver Manager Trace in a
PowerBuilder application, you must specify the TraceFile DBParm
parameter in the appropriate script. For example, you might include it
in the script that opens the application.

You can specify the TraceFile parameter in a PowerBuilder script
by:

  • (Recommended) Copying the PowerScript TraceFile DBParm
    syntax from the Preview tab in the Database Profile Setup dialog
    box into your script

  • Coding PowerScript to set a value for the DBParm property of
    the Transaction object

  • Reading the DBParm values from an external text file

For more about using Transaction objects to communicate with a
database in a PowerBuilder application, see Using Transaction Objects in Application Techniques.

About the TraceFile DBParm
parameter

TraceFile controls the operation of JDBC Driver Manager Trace
for any JDBC-compatible driver you are using in PowerBuilder.

Copying TraceFile syntax from the Preview
tab

The easiest way to start JDBC Driver Manager Trace in a
PowerBuilder application script is to copy the PowerScript TraceFile
DBParm syntax from the Preview tab in the Database Profile Setup –
JDBC dialog box into your script, modifying the default Transaction
object name (SQLCA) if necessary.

As you complete the Database Profile Setup dialog box in the
development environment, PowerBuilder generates the correct connection
syntax on the Preview tab. Therefore, copying the syntax directly from
the Preview tab into your script ensures that it is accurate.

To copy TraceFile syntax from the Preview tab into your
script:

  1. On the Options tab in the Database Profile Setup – JDBC
    dialog box for your connection, select the Trace JDBC Calls check
    box and (optionally) specify a log file in the Trace File box to
    start JDBC Driver Manager Trace.

    For instructions, see Stopping JDBC Driver Manager
    Trace in the development environment
    .

  2. Click Apply to save your changes to the Options tab without
    closing the dialog box.

  3. Click the Preview tab.

    The correct PowerScript syntax for JDBC Driver Manager Trace
    and other selected options displays in the Database Connection
    Syntax box.

    The following example shows the PowerScript syntax that
    starts JDBC Driver Manager Trace and sends output to the file
    C:TEMPJDBC.LOG.

  4. Select the DBParm line and any other syntax you want to copy
    to your script and click Copy.

    PowerBuilder copies the selected text to the
    clipboard.

  5. Paste the selected text from the Preview tab into your
    script, modifying the default Transaction object name (SQLCA) if
    necessary.

Coding PowerScript to set a value for the
DBParm property

Another way to start JDBC Driver Manager Trace in a
PowerBuilder application script is to include the TraceFile parameter
as a value for the DBParm property of the Transaction object.

To start JDBC Driver Manager Trace by setting the DBParm
property:

  • In your application script, include the TraceFile parameter
    to start the trace and specify a nondefault trace file.

    For example, this statement starts JDBC Driver Manager Trace
    in your application and sends output to a file named MYTRACE.LOG.
    (This example assumes you are using the default Transaction object
    SQLCA, but you can also define your own Transaction
    object.)

Reading the DBParm value from an external
text file

As an alternative to setting the DBParm property in your
PowerBuilder application script, you can use the PowerScript
ProfileString function to read DBParm values from a specified section
of an external text file, such as an application-specific
initialization file.

This assumes that the DBParm value read from your initialization
file includes the TraceFile parameter to start JDBC Driver Manager
Trace, as shown in the preceding example.

To start JDBC Driver Manager Trace by reading DBParm values
from an external text file:

  • Use the following PowerScript syntax to specify the
    ProfileString function with the DBParm property:

    For example, the following statement in a
    PowerBuilder script reads the DBParm values from the [Database]
    section of the APP.INI file:


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