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

Article translations Article translations
Article ID: 244962 - View products that this article applies to.
This article was previously published under Q244962
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 56540 (SQLBUG_70)
Expand all | Collapse all

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.

Properties

Article ID: 244962 - Last Review: February 28, 2014 - Revision: 3.1
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft ActiveX Data Objects 2.1
  • Microsoft ActiveX Data Objects 2.5
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB244962

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com