PRB: 80040e25 Error Calling a Stored Procedure

ID: Q189650


The information in this article applies to:
  • ActiveX Data Objects (ADO), version 1.5


SYMPTOMS

When you call a SQL Server 6.5 Stored Procedure using ActiveX Data Objects (ADO) version 1.5, the following error appears:

Microsoft OLE DB Provider for ODBC Drivers error '80040e25' All HROWs must be released before new ones can be obtained.
This error occurs if the recordset is created with an adOpenKeySet (1) or adOpenStatic (3) cursor.


RESOLUTION

Here are several possible resolutions:

  • Use a CursorType of adOpenForwardOnly (0) or adOpenDynamic (3) as in the following:


  • 
    rstAuthors.Open "sp_report", cnnPubs, 0, 3 
  • Use a CursorLocation of adUseClient (3) as in the following:


  • 
    Set rstAuthors = CreateObject("ADODB.Recordset")
    rstAuthors.CursorLocation = 3
    rstAuthors.Open "sp_report", cnnPubs, 1, 3 
  • Use the EXEC or CALL keywords to call the Stored Procedure as in the following:


  • 
    rstAuthors.Open "EXEC sp_report", cnnPubs, 1, 3 


STATUS

This error does not occur with ADO version 1.0.

This problem was corrected in ActiveX Data Objects (ADO) 2.0 and later.

You may download the latest version of ADO in the Microsoft Data Access Components (MDAC) download, available at the following site:

http://www.microsoft.com/data/download.htm

Additional query words:

Keywords : kbADO kbADO150 kbADO150bug kbADO200fix kbDatabase kbSQLServ kbStoredProc kbGrpVBDB kbGrpMDAC kbDSupport kbADO210sp2fix
Version : WINDOWS:1.5
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: November 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.