Stopping JDBC Driver Manager Trace in a PowerBuilder application

To stop JDBC Driver Manager Trace in a PowerBuilder application script, you must delete the TraceFile parameter. You can do this by:

Editing the DBParm property

One way to change the TraceFile parameter in a PowerBuilder script is to edit the DBParm property of the Transaction object.

StepsTo stop JDBC Driver Manager Trace by editing the DBParm property:

  1. In your application script, edit the DBParm property of the Transaction object to delete the TraceFile parameter.

    For example, the following statement starts JDBC Driver Manager Trace in your application and sends the 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.)

    SQLCA.DBParm = "Driver='com.sybase.jdbc3.jdbc.SybDriver',
    URL='jdbc:sybase:Tds:199.93.178.151:5007/tsdata',
    TraceFile='c:\MYTRACE.LOG'"
    

    Here is how the same statement should look after you edit it to stop JDBC Driver Manager Trace.

    SQLCA.DBParm = "Driver='com.sybase.jdbc3.jdbc.SybDriver',
    URL='jdbc:sybase:Tds:199.93.178.151:5007/tsdata'"
    

Reading DBParm values

As an alternative to editing 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, or you can use RegistryGet to obtain values from a registry key.

This assumes that the DBParm is no longer read from your initialization file or registry key, as shown in the preceding example. You must disconnect and reconnect for this to take effect.