PRB: Catastrophic Error Seen with Addition of Datasource Connection to Sybase 11x (245500)



The information in this article applies to:

  • Microsoft OLE DB Provider for ODBC 2.0
  • Microsoft OLE DB 2.0
  • Microsoft OLE DB 2.1
  • Microsoft OLE DB 2.5
  • Microsoft Data Access Components 2.0
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6

This article was previously published under Q245500

SYMPTOMS

When you add an ODBC connection to Sybase 11x and the catalog name is specified in the connection string for the Microsoft OLE DB Provider for ODBC Drivers, this error occurs:
Catastrophic Error

CAUSE

This problem occurs because of a bug in the Merant Sybase ODBC driver. The system stops responding if SQL_ATTR_CURRENT_CATALOG is set on the connection handle before the actual connection is made with SQLDriverConnect.

RESOLUTION

This problem can be prevented if the initial catalog is not specified when you connect to Sybase 11.x with the Microsoft OLE DB Provider for ODBC Drivers (MSDASQL) and the Sybase ODBC driver.

STATUS

Microsoft has determined that this problem occurs due to a bug in the Merant Sybase ODBC driver. The MSDASQL provider has no role in this process.

MORE INFORMATION

When you use the Merant Sybase ODBC driver in conjunction with MSDASQL to set up a connection, if you specify a Catalog name, this error occurs:
Catastrophic Error
If the catalog name is specified, SQL_CURRENT_QUALIFIER is set on the connection handle before the connection occurs, which then causes an Access Violation in the Syutlnt.dll file.

To reproduce the problem, use Visual Studio 6.1 service pack 3 (SP3), with the Viddbpkg.dll file that enables the data source link (DSL), and follow these steps:

  1. Use Visual Studio and create a Web project.
  2. In the Project Explorer window, highlight the project name, right-click the project name and then click Add Data Connection.
  3. In the Data Sources dialog box, click the Machine Data Sources tab and select Microsoft OLEDB for ODBC Drivers.
  4. In the Data Link Properties dialog box, choose Next.
  5. Select ODBC System DSN to Sybase.
  6. Enter a Login.
  7. Enter a Catalog.
  8. Click OK.
If the user selects an initial catalog in the DSL, the DSL returns a connect string that looks like this:

"Provider=MSDASQL.1;
Persist Security Info=False;
User ID=sa;
Data Source=MySystemSyBase;
Initial Catalog=pubs2"

Opening a Microsoft ActiveX Data Objects (ADO) connection against a SYBASE database with this connect string fails. The MSDASQL provider normally translates Initial Catalog to Database but apparently the Sybase driver does not accept that keyword.

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbBug kbnofix kbprb KB245500