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

TraceEnableActivity – PB Docs 2019 – PowerBuilder Library

TraceEnableActivity – PB Docs 2019

TraceEnableActivity

PowerScript function

Description

Enables logging of the specified trace activity.

Syntax

Argument

Description

activity

A value of the enumerated datatype TraceActivity that
identifies the activity to be logged. Values are:

  • ActError! — Occurrences of system errors and
    warnings

  • ActESQL! — Embedded SQL statement entry and
    exit

  • ActGarbageCollect! — Start and finish of garbage
    collection

  • ActLine! — Routine line hits (if this value is
    enabled, ActRoutine! is automatically enabled)

  • ActObjectCreate! — Object creation entry and
    exit

  • ActObjectDestroy! — Object destruction entry and
    exit

  • ActProfile! — Abbreviation for the ActRoutine!,
    ActESQL!, ActObjectCreate!, ActObjectDestroy, and
    ActGarbageCollect! values

  • ActRoutine! — Routine entry and exit

  • ActTrace! — Abbreviation for all activities except
    ActLine!

Return value

ErrorReturn. Returns one of the following values:

  • Success! — The function succeeded

  • FileNotOpenError! — TraceOpen has not been called yet

  • TraceStartedError! — You have called TraceEnableActivity after
    TraceBegin and before TraceEnd

Usage

Call the TraceEnableActivity function following the TraceOpen
function. TraceEnableActivity allows you to specify the types of
activities you want logged in the trace file. The default activity type
logged is a user-defined activity type identified by the value ActUser!.
This activity is enabled by the TraceOpen call. You must call
TraceEnableActivity to specify the activities to be logged before you call
TraceBegin.

Each call to TraceOpen resets the activity types to be logged to the
default (that is, only ActUser! activities are logged).

Since the ActError! and ActUser! values require the passing of
strings to the trace file, you must call the TraceError and TraceUser
functions to log this information.

Unless specifically disabled with a call to the TraceDisableActivity
function, activities that are enabled with TraceEnableActivity remain
enabled throughout the entire application run.

Examples

This example opens a trace file with the name you entered in a
single line edit box and a timer kind selected from a drop-down list. Then
it begins logging the enabled activities for the first block of code to be
traced:

See also

TraceOpen

TraceBegin

TraceDisableActivity


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