ADODB.Recordset error ' 800a0cc1'

Results 1 to 5 of 5

Thread: ADODB.Recordset error ' 800a0cc1'

  1. #1
    Alban Schmid Guest

    Default ADODB.Recordset error ' 800a0cc1'

    I am trying to insert a record in the order table, then retrieve the OrderID in order to place the order details afterwards on another page. <BR><BR>Here is the code:<BR><BR>Set rsInsOrder = objconn.execute("exec sp_InsOrder &#039" & strCust & "&#039," & intEmpID & "," & intShipper &"")<BR> intOrderID = rsInsOrder("OrderID")<BR><BR>********************* **<BR><BR>The sproc goes as follows:<BR><BR>CREATE PROCEDURE sp_InsOrder<BR><BR>@CustomerID nchar (5),<BR>@EmployeeID int,<BR>@ShipVia int<BR><BR><BR>AS<BR><BR><BR>BEGIN <BR><BR>insert into orders (CustomerID, EmployeeID, OrderDate, ShipVia) <BR>values (@CustomerID, @EmployeeID, getdate(), @ShipVia)<BR><BR><BR>select @@identity AS OrderID<BR><BR>END<BR><BR>***************<BR><BR>T his sproc works perfectly in isqlw !<BR><BR>***************<BR><BR>the error message I get is:<BR><BR>ADODB.Recordset error &#039 800a0cc1&#039 <BR><BR>Item cannot be found in the collection corresponding to the requested name or ordinal. <BR><BR>checkOrderInsert.asp, line 24 <BR><BR>(the line 24 is the second line of the aforementioned code)<BR><BR>************<BR><BR>Can someone help me out on this?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ADODB.Recordset error ' 800a0cc1'

    this error. simply means the column name is wrong. Just check out for spellingmistakes. :)<BR><BR>happens many a times<BR>

  3. #3
    Join Date
    Dec 1969

    Default missing table name ?

    select @@identity AS OrderID from orders<BR>, should be the query. i think<BR>

  4. #4
    Alban Schmid Guest

    Default It does not look like a typo

    the sproc line:<BR><BR>select @@identity AS OrderID<BR><BR>is spelled the same as ASP code:<BR><BR>intOrderID = rsInsOrder("OrderID")

  5. #5
    Alban Schmid Guest

    Default table name is not necessary as @@identity is a glo

    table name is not necessary; it is not a SQL problem, as can be tested with isqlw. When exec the sproc, it returs the OrderID. The problem is that ADO does not return it in the recordSet...

Posting Permissions

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