psConnectionAppName - cConnection

Application name value that will be passed in the SQL connection string

Type: Property

Access: Read/Write

Data Type: String

Parameters: None

 Property String psConnectionAppName

Read Access: Get psConnectionAppName to StringVariable
Write Access: Set psConnectionAppName to StringVariable/Value


psConnectionAppName applies to the MSSQL driver.

psConnectionAppName value will be passed in the SQL connect string when using the MSSQL driver as: "APP="

If not explicitly set, the cConnection class will set the value to the name the name of the running program.

The application name passed in the connect string can be used in SQL to track which program performed database operations.

In SQL Server the App_Name() function can be used to retrieve the application name.


The following SQL code can be used in a trigger, to determine which DataFlex program made a certain change.

    (    [ID]
        , app_name()
        , GetDate()
    From inserted

The application name can also be seen in SQL Profiler.