PRSQL9202013: SqlOpenConnection%() Doesn't Set Name in Record

ID Number: Q81392

1.11

OS/2

buglist1.11

Summary:

Problem ID: PRSQL9202013

SYMPTOMS

The application name, as set by the function SqlOpenConnection%(),

does not appear in the program_name column of the sysprocesses

table once a connection to SQL Server has been successfully

established.

CAUSE

The SqlOpenConnection%() function fails to set the application name

in the login record with the app$ parameter. Thus, the application

name is never registered with the SQL Server process associated

with the connection.

WORKAROUND

To avoid this problem, use the SqlOpen%() function rather than the

high-level function SqlOpenConnection%(). Note that in order to use

SqlOpen%() successfully, you must first allocate a login record and

set the appropriate login attributes. For example:

Login% = SqlLogin%()

Results% = SqlSetLUser%(Login%, "loginid")

Results% = SqlSetLPwd%(Login%, "passwd")

Results% = SqlSetLApp%(Login%, "myapp")

SqlConn% = SqlOpen%(Login%, "server")

STATUS

Microsoft has confirmed this to be a problem in the Microsoft

Visual Basic Library for SQL Server (VBSQL) version 1.0. This

problem was corrected in VBSQL version 4.2.