This error

Results 1 to 3 of 3

Thread: This error

  1. #1
    Join Date
    Dec 1969

    Default This error

    I am getting this error when i try to store some records in an Array using getrows(). <BR><BR><BR>ADODB.Recordset error &#039;800a0bcd&#039; <BR><BR>Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. <BR><BR>updateall.asp, line 84 <BR><BR>Here is a sample of my code.<BR><BR>Session("currentshop")=currentshop + 1<BR>shopname= (Session("shop"+currentshop+"name"))<BR><BR><BR>//open up the database<BR>DatabasePath="orderinfo.mdb";<BR>conn = Server.CreateObject("ADODB.Connection");<BR>conn.O pen("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" + Server.MapPath(DatabasePath));<BR>sql = "SELECT order_num, ID, qty, shop, order_seq_num FROM order_details "<BR>+ "WHERE shop = &#039;"+ shopname + "&#039; AND order_num = "<BR>+ ordernum + " order by order_seq_num;";<BR><BR>rst = Server.CreateObject("ADODB.Recordset");<BR>rst.Ope n(sql,conn,1);<BR>Response.Write(sql);<BR><BR><BR> Shop= new Array();<BR>Shop=rst.GetRows()<BR>Session("Shop") = Shop //store array in session<BR>;<BR>;<BR>;<BR><BR><BR>Shop=rst.GetRows () is line 84.<BR><BR>Is there anyway i can prevent it happening?

  2. #2
    Join Date
    Dec 1969

    Default Yes...

    Instead of:<BR>Shop=rst.GetRows()<BR><BR>Have:<BR>if rst.EOF = False then Shop=rst.GetRows()<BR><BR>However, you will need to see if the query brought anything back. You can do this using IsArray():<BR>If IsArray(Shop) = False then Response.Write("No Records Returned")<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default RE: This error

    &#062;&#062;&#062;Is there anyway i can prevent it happening?<BR><BR>Make sure there are records in the Recordset.<BR><BR>If Not Rst.EOF Then<BR> rst.GetRows()<BR>else<BR> Response.write "No records returend"<BR>end if

Posting Permissions

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