Microsoft KB Archive/244962

From BetaArchive Wiki
Knowledge Base


FIX: Calling a Stored Procedure with Text/Image Parameters using ADO May Cause an Access Violation

Article ID: 244962

Article Last Modified on 3/14/2006



APPLIES TO

  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft ActiveX Data Objects 2.1
  • Microsoft ActiveX Data Objects 2.5



This article was previously published under Q244962

BUG #: 56540 (SQLBUG_70)

SYMPTOMS

An application using ActiveX Data Objects (ADO) to call a Stored Procedure (SP), on SQL Server 7.0, may cause an Access Violation (AV) on the server.

The cause of the Access Violation has been isolated to the following conditions:

  • To execute the Stored Procedure, the application uses ADO to execute a command of type adCmdStoredProc with each of the SPs parameters explicitly bound.
  • The Stored Procedure accepts at least one parameter that eventually inserts or updates an NTEXT, TEXT or IMAGE column.
  • At least one of the TEXT or IMAGE parameters are bound to a NULL value.


WORKAROUND

Do not explicitly bind a NULL value to a stored procedure parameter that eventually inserts or updates an NTEXT, TEXT, or IMAGE column.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0


For more information, contact your primary support provider.

MORE INFORMATION

Alternatively, executing the stored procedure using Remote Data Objects (RDO), ODBC, or, OLEDB may also exhibit the same access violation under the same circumstances.

Keywords: kbbug kbfix KB244962