SQL stored proc - Urgent _Dead

Results 1 to 3 of 3

Thread: SQL stored proc - Urgent _Dead

  1. #1
    seamuscushley Guest

    Default SQL stored proc - Urgent _Dead

    Please help -<BR><BR>Returning can not find reference. When I know for a fact it is there.<BR><BR><BR>&#039;========================== ===============================================<BR > &#039; Establish Database Connection<BR> &#039;============================================ =============================<BR> SET objDBConnection = server.CreateObject("ADODB.Connection")<BR> objDBConnection.ConnectionString ="PROVIDER=SQLOLEDB;SERVER=moby;UID=sa;PWD=;DATABA SE=QMS"<BR> objDBConnection.Mode = adModeReadWrite<BR> objDBConnection.Open<BR><BR> &#039;============================================ =============================<BR> &#039; Establish RecordSet<BR> &#039;============================================ =============================<BR> SET objDBReturnedRecords = Server.CreateObject("ADODB.Recordset")<BR><BR> SET objDBReturnedRecords = objDBConnection.Execute ("qms.SP_QSEI_GET_USER_TEAM_QUEUES 1000003,0")<BR><BR> Response.Write(objDBReturnedRecords("TEAM_ID"))<BR ><BR><BR><BR>ADODB.Recordset (0x800A0CC1)<BR>Item cannot be found in the collection corresponding to the requested name or ordinal.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL stored proc - Urgent _Dead

    It looks like ADO knows for a fact that the field &#039;TEAM_ID&#039; is not present...<BR><BR>Maybe you have more than one SELECT statement in your stored procedure so that you get multiple recordsets returned. To switch to a next one use something like:<BR>SET objDBReturnedRecords = objDBReturnedRecords.NextRecordset()<BR><BR>Or else write this to see what fields you do have in your recordset:<BR><BR>For Each objField In objDBReturnedRecords<BR> Response.write objField.Name & "<BR><BR>Next

  3. #3
    seamuscushley Guest

    Default RE: To wouter

    Wouter<BR><BR>You seemed to have a great understanding. Thanks<BR>please continue with your help<BR>Seamus<BR><BR>With stored procedures:<BR>1. Is it possible to count the number of recordsets returned & deal with them<BR>2. Is it easy to cycle through recordsets.<BR>3. What if the stored proc need a specific user applied.<BR> qms.SP_QSEI_GET_USER_TEAM_QUEUES<BR><BR>3. Do I have to declare objfield as object because the for line is not working<BR><BR> For Each objField In objDBReturnedRecords <BR> Response.write objField.Name & "<BR>" <BR> Next <BR>4. I think you are write about the multiple recordsets<BR><BR><BR>SET objDBReturnedRecords = objDBConnection.Execute ("qms.SP_QSEI_GET_USER_TEAM_QUEUES " &intUserID& "," &ERROR_LOG_ID& "")<BR><BR><BR>Do While Not objReturnedRecords.EOF<BR> objDBReturnedRecords.Fields.Item("name")<BR><BR> objReturnedRecords.MoveNext<BR> Loop<BR><BR>Operation is not allowed when the object is closed.<BR><BR><BR><BR>

Posting Permissions

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