AppName
database parameter
Description
If the DBMS supports it, specifies the application name you want
to use when connecting to the database in PowerBuilder.
When to specify AppName
You must specify the AppName parameter before connecting to the
database.
Applies to
ASE, SYC SAP Adaptive Server Enterprise
DIR SAP DirectConnect
SNC SQL Native Client for Microsoft SQL Server
MSOLEDBSQL Microsoft OLE DB Driver for SQL Server
Syntax
|
1 |
AppName='application_name' |
Default value
For Adaptive Server and DirectConnect, PowerBuilder sets the
CS_APPNAME connection property to PowerBuilder, as follows:
|
1 |
AppName='PowerBuilder' |
For SQL Server, there is no default value for AppName.
Usage
Adaptive Server databases
It is useful to specify a different AppName value for each of your
Adaptive Server applications. If you are an administrator, you can query
the MASTER.DBO.SYSPROCESSES table to determine which applications are
running on the database server. The value specified for AppName displays
in the program_name column of the MASTER.DBO.SYSPROCESSES table, making
it easy to identify the applications.
Examples
Example 1
To set the application name to Test:
-
Database profile
Type the following in the Application Name box on the Network
or System page in the Database Profile Setup dialog box:1Test -
Application
Type the following in code:
1SQLCA.DBParm="AppName='Test'"
Example 2
(Does not apply to DirectConnect) You can set the AppName and Host
parameters in a single statement to specify both the application name
and the host name. To set the application name to Sales and the host
name to Fran:
-
Database profile
Type Sales in the Application Name box and Fran in the
Workstation Name box on the Network page in the Database Profile
Setup dialog box. -
Application
Type the following in code:
1SQLCA.DBParm="AppName='Sales',Host='Fran'"
See also
(applies only to ASE and SYC SAP Adaptive Server
Enterprise)