Microsoft KB Archive/317989

= FIX: Sqlakw32.dll May Corrupt SQL Statements =

Article ID: 317989

Article Last Modified on 11/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Personal Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Workgroup Edition
 * Microsoft SQL Server 2000 Desktop Engine (Windows)
 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Enterprise Edition 64-bit
 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q317989



BUG #: 356597 (SHILOH_BUGS)

BUG #: 58350 (sqlbug_70)



SYMPTOMS
An ESQL/C application may experience all kinds of unexpected errors when opening a cursor:  An OPEN CURSOR command fails with a syntax error from SQL Server. An OPEN CURSOR command fails with this 16945 error message:

The cursor was not declared.

 The ESQL cursor does not contain the expected data.

To confirm these symptoms, trace the SQL commands in the ESQL application by using SQL Profiler. In the SQL Profiler trace, you will see where corrupted statements were sent to SQL Server.

For example, instead of a line similar to this in the trace exec sp_cursoropen @P1 output, 'SELECT EmployeeID, LastName, FirstName from employees where EmployeeID = 8', @P3 output, 4, @P5 output you will see a line similar to this: exec sp_cursoropen @P1 output, 'SE0', @P3 output, 4, @P5 output



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 How to obtain the latest SQL Server 2000 service pack

Microsoft SQL Server 2000 Service Pack 2
The English version of the SQL Server 2000 Service Pack 2 fix should have the following file attributes or later:   Date        Time    Version    Size      File name ---  26-Feb-02   02:37   8.00.581   126,976   Sqlakw32.dll

Microsoft SQL Server 2000 Service Pack 3
The English version of the SQL Server 2000 Service Pack 3 fix should have the following file attributes or later:   Date          Time    Version    Size      File name ---  19-Feb-2004   09:02   8.00.916   168,001   Sqlakw32.dll

Note Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.

Note Although the lower build number may suggest it, this fix is not included in SQL Server 2000 SP3.



MORE INFORMATION
Please note that ESQL/C is based on the DB-Library API. Therefore, the following paragraph of the &quot;DB-Library API&quot; topic in SQL Books Online applies also to ESQL/C:

&quot;The DB-Library API has not been enhanced beyond the level of SQL Server version 6.5. All DB-Library applications can work with SQL Server 2000, but only as 6.5 level clients. Features introduced in SQL Server 2000 and SQL Server version 7.0 are not supported for DB-Library applications.&quot;

Additionally, please note section 7.0 of the Sp2readme.htm that was included with SQL Server 2000 Service Pack 2:

7.0 DB-Library and Embedded SQL for C
While the DB-Library and Embedded SQL for C application programming interfaces (APIs) are still supported in SQL Server 2000, no future versions of SQL Server will include the files needed to do programming work on applications that use these APIs. Connections from existing applications written using DB-Library and Embedded SQL for C will still be supported in the next version of SQL Server, but this support will also be dropped in a future release. When writing new applications, avoid using these components. When modifying existing applications, you are strongly encouraged to remove dependencies on these technologies. Instead of DB-Library or Embedded SQL for C, you can use ADO, OLE DB, or ODBC to access data in SQL Server. Please refer to SQL Server Books Online for more information on these technologies.

Keywords: kbbug kbfix kbqfe kbhotfixserver KB317989

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.