AppName – PB Docs 126

AppName database parameter

Description

If the DBMS supports it, specifies the application name you
want to use when connecting to the database in PowerBuilder.

note.png When to specify AppName

You must specify the AppName parameter before connecting
to the database.

Controls

  • ASE, SYC SAP Adaptive
    Server Enterprise

  • DIR Sybase DirectConnect

  • SNC SQL Native Client for Microsoft SQL Server

Syntax

Default

For Adaptive Server and DirectConnect, PowerBuilder sets the CS_APPNAME
connection property to PowerBuilder, as follows:

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:

  • Application

    Type the following in code:

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:

See Also

  • Host (applies
    only to ASE and SYC SAP Adaptive Server Enterprise)


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