SqlSetLApp%

Sets the application name in the SQL Server login record.

Syntax

SqlSetLApp% ( loginrec%, app$ )

where

loginrec%
Is a login record. The value of loginrec% is returned by SqlLogin%.
app$
Is the application name sent to SQL Server. This string can have as many as 30 characters. SQL Server stores only the first 16 characters and ignores the rest.

Returns

SUCCEED (1) or FAIL (0).

Remarks

For SqlSetLApp% to have any effect, it must be called before SqlOpen%. SqlSetLApp% is optional. If SqlSetLApp% is not called, the application name is set to an empty string.

SQL Server uses the application name in its sysprocesses table to help identify your connection. You see the application name when you query the sysprocesses table in the master database.

See Also

SqlLogin%, SqlOpen%, SqlSetLHost%, SqlSetLPwd%, SqlSetLUser%