Help on a error

Results 1 to 3 of 3

Thread: Help on a error

  1. #1
    moti Guest

    Default Help on a error

    Dear Sirs ,<BR>I was trying to get a random number from 1 to 5 and only take the recordset from the mdb were the book_id is equal the random number .<BR>I have used the response.write to see that my random number value is working ,<BR>But when trying to get the record set i get this message .ADODB.Field error &#039 80020009&#039 <BR><BR>Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record. <BR><BR>? <BR>Please help me what is happening .<BR>Best Regards <BR>Moti<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Help on a error

    Are you sure that your random number is a number and not a string? <BR><BR>Try converting your RandomNumber using the Cint function:<BR><BR>RandomNumber = Cint(RandomNumber)

  3. #3
    moti Guest

    Default RE: Help on a error/donna

    Deae Donna ,<BR>I have the =with a number 1 vunstad the random num and it worked ,<BR>As well i have displayed the rnd number and was ok but the two together no way .<BR>Donna this is the script what would you do ? dim conn, rs, SQL, a, b<BR>a= int((5*rnd)+1)<BR>b= int((5*rnd)+1)<BR><BR>set conn = server.CreateObject ("ADODB.connection")<BR> "dsn=books"<BR>set rs = server.CreateObject ("ADODB.recordset")<BR>SQL = "select * from books where book_id like &#039 " & a & "&#039 " <BR> SQL, conn<BR><BR>response.write a & "<BR>"<BR><BR>response.write rs("book_title")<BR>response.write rs("author") & "<BR>"<BR>rs.Close <BR>set rs = nothing<BR>conn.Close<BR>set conn = nothing<BR><BR>%&#062;<BR>Regards <BR>Moti<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