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.
INSERT INTO VendorHIS ( [ID] ,[Name] ,[ChangeApplication] ,[ChangeDatetime] ) Select [ID] ,[Name] , app_name() , GetDate() From inserted
The application name can also be seen in SQL Profiler.