Results 1 to 18 of 18

Thread: [RESOLVED] Multiple-step OLE DB operation generated errors

Threaded View

  1. #1

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Resolved [RESOLVED] Multiple-step OLE DB operation generated errors

    Hi,

    I've got a problem with trying to open the following recordset. code breaks on the highlighted line

    "Microsoft OLE DB Provider for SQL Server error '80040e21'

    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."


    I've checked my version of MDAC it's 2.8 using SQL Server 2000 on windows 2003 server. Also not using the security info thing in my connection string

    Does anyone have any idea what the problem might be?

    VB Code:
    1. Set rsRptSects = GetReportSections(38,"A")
    2.  
    3. Function GetReportSections(id,status)
    4.     If LenB(status)=0 Then status=NULL
    5.     Dim myCmd   : Set myCmd=Server.CreateObject("ADODB.Command")
    6.     Dim rs      : Set rs=Server.CreateObject("ADODB.Recordset")
    7.     'Response.Write "Setup ID: " & id & "<br>"
    8.     With myCmd
    9.         .CommandType=adCmdStoredProc
    10.         .CommandText="up_mGetReport_Sections"
    11.         .Prepared=True
    12.         .ActiveConnection=cn
    13.         .Parameters.Append .CreateParameter("@Setup_ID", adInteger, adParamInput, 18, cInt(id)) ' Report ID
    14.         .Parameters.Append .CreateParameter("@Status", adVarchar, adParamInput, 100, status)
    15. '       Set GetReportSections=.Execute
    16.         [HL="#FFFF00"]rs.Open myCmd,,adOpenStatic,adLockReadOnly[/HL]
    17.         Set GetReportSections=rs
    18.     End With
    19.     Set myCmd=Nothing
    20.     Set rs=Nothing 
    21. End Function
    Cheers Al
    Last edited by aconybeare; Dec 5th, 2006 at 08:55 AM. Reason: hilight error line

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width