BUG: Value of cbDSN in SQLConnect is Not Mapped CorrectlyLast reviewed: September 9, 1996Article ID: Q120045 |
The information in this article applies to:
BUG# ODBCSDK2: 2693 (2.0)
SYMPTOMSWhen connecting from a 16-bit application to a certain 32-bit driver in a Microsoft Windows NT environment, you may receive an error from the driver about incorrect parameter or argument value. This does not happen when SQLConnect is called from a 32-bit application to a 32-bit driver or from a 16-bit application to a 16-bit driver. For example, assume that the datasource name is "DsnName" with cbDSN=8. Then, the following calls show the behavior:
//Allocate environment handle SQLAllocEnv(phenv); //Allocate connection handle SQLAllocConnect(henv,phdbc); //Specify szDSN="DsnName" and cbDSN= length of ("DsnName")=8 SQLConnect(hdbc,"DsnName",8,szUID,cbUID,szAuthStr,cbAuthStr);In looking at the ODBC trace using 32-bit ODBC Spy, you will find that the value of cbDSN passed is not 8, but a large number (0x3a43).
CAUSEWhen connecting from a 16-bit application to a 32-bit driver, the value of cbDSN in SQLConnect is not correctly passed and is mapped to a large value. However, the values of cbUID and cbAuthStr are passed correctly.
STATUSMicrosoft has confirmed this to be a problem in ODBC Driver Manager version 2.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |