Multiple-step operation generated errors. Check each status value.

Discussion in 'C#' started by bubberz, Feb 21, 2006.

  1. #1
    I'm getting the following error:

    Microsoft Cursor Engine error '80040e21'

    Multiple-step operation generated errors. Check each status value.

    /CC/rpt/incPcrList.asp, line 82

    *******************************
    Here's the code(Line 82 is the last line below):
    <!--#include file="VBFunctions.inc"-->
    <%
    'ReportName = "pcr-report.rpt"
    Function CreatePcr(cPcr_no, nMaster_Id)
    Set ATTGRecSet = Server.CreateObject("ADODB.RecordSet")
    ATTGRecSet.CursorType = adOpenDynamic
    pcrno = REQUEST.QUERYSTRING("pcr_no")
    verdt = REQUEST.QUERYSTRING("verdt")
    SQLQ = "Select Pcr.* FROM Pcr WHERE pcr_no = '" & pcrno & "' and version_dt = #" & verdt & "#"

    if session("sessionDB") <> "" then
    VarDSN = FunctDBSelect(session("sessionDB"))
    else
    varDSN = "sns_prod"
    end if

    Set MyConn=Server.CreateObject("ADODB.Connection")
    MyConn.Open varDSN
    ATTGRecSet.Open SQLQ, MyConn
    versiondt = ATTGRecSet.fields("Version_Dt")
    wbs = ATTGRecSet.fields("wbs_no")
    PCRNO = ATTGRecSet.fields("pcr_no")

    Set PCRWBSAffRecSet = Server.CreateObject("ADODB.RecordSet")
    SQLPCRWBSAff = "Select PCR_WBS_Affected.* FROM PCR_WBS_Affected WHERE pcr_no = '" & pcrno & "' and version_dt = #" & verdt & "#"
    PCRWBSAffRecSet.Open SQLPCRWBSAff, MyConn

    Set PCRDCNAffRecSet = Server.CreateObject("ADODB.RecordSet")
    SQLPCRDCNAff = "Select PCR_DCN_Affected.* FROM PCR_DCN_Affected WHERE pcr_no = '" & pcrno & "' and version_dt = #" & verdt & "#"
    PCRDCNAffRecSet.Open SQLPCRDCNAff, MyConn
    Set PCRPCRAffRecSet = Server.CreateObject("ADODB.RecordSet")
    SQLPCRPCRAff = "Select PCR_PCR_Affected.* FROM PCR_PCR_Affected WHERE pcr_no = '" & pcrno & "' and version_dt = #" & verdt & "#"
    PCRPCRAffRecSet.Open SQLPCRPCRAff, MyConn
    Set TBLWBSELERecSet = Server.CreateObject("ADODB.RecordSet")
    SQLTBLWBSELE = "Select tbl_WBS_ELEMENTS.* FROM tbl_WBS_ELEMENTS WHERE WBS = '" & wbs & "'"
    TBLWBSELERecSet.Open SQLTBLWBSELE, MyConn

    Set PCRAPPRRecSet = Server.CreateObject("ADODB.RecordSet")
    SQLPCRAPPR = "Select PCR_APPROVAL.* FROM PCR_APPROVAL WHERE pcr_no = '" & pcrno & "' and version_dt = #" & verdt & "#"
    PCRAPPRRecSet.Open SQLPCRAPPR, MyConn

    STL = 0
    DD = 0

    ' Add and populate a PCR record
    rsPcr.AddNew

    ' Set PCR record set values
    '
    rsPcr.Fields("Creation_DT").Value = ATTGRecSet.fields("Creation_DT")
    rsPcr.Fields("Version_DT").Value = ATTGRecSet.fields("Version_DT")
    rsPcr.Fields("WBS_NO").Value = ATTGRecSet.fields("WBS_NO")
    rsPcr.Fields("PCR_NO").Value = ATTGRecSet.fields("PCR_NO")
     
    bubberz, Feb 21, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    it looks like a value type issue - try changing the value type.

    newval = cStr(ATTGRecSet.fields("PCR_NO"))
    rsPcr.Fields("PCR_NO").Value = newval
     
    vectorgraphx, Feb 21, 2006 IP
  3. bubberz

    bubberz Guest

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the reply!

    Tried that...same error.
     
    bubberz, Feb 21, 2006 IP
  4. mnemtsas

    mnemtsas Super Dud

    Messages:
    497
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Without looking at your code I can tell you that you are getting this error because you are trying to put a string into a VARCHAR field that is too long. So, for example you are trying to put a 60 char string into a VARCHAR(50) field.
     
    mnemtsas, Feb 21, 2006 IP
  5. skimkid

    skimkid Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks your explanation. I it helped me solve the same error
     
    skimkid, Feb 19, 2009 IP