rs.EOF,rs BOF,

Results 1 to 4 of 4

Thread: rs.EOF,rs BOF,

  1. #1
    Martin Guest

    Default rs.EOF,rs BOF,

    Please someone can explain me the differances beetween <BR>this, with very basic lenguage, i cant get it my head<BR><BR>like where is it start and differances, why we use (not) sometime<BR><BR>if not rs.EOF = ?<BR><BR>if not rs.BOF = ?<BR><BR>if not rs.BOF and not rs.EOF = ?<BR><BR>if rs.EOF = ?<BR><BR>if rs.BOF and rs.EOF = ?

  2. #2
    SPG Guest

    Default RE: rs.EOF,rs BOF,

    EOF = End of File; BOF = Beginning of File<BR><BR>[Note: The term file is a bit of a holdover from older databases. When dealing with EOF and BOF concerning database record sets, a record set is a "file."]<BR><BR>If you are either at the EOF or at the BOF, then you are actually outside of the file (record set) and therefore can&#039t ask anything about that file (record set) without generating an error.<BR><BR>"What color is the spoon?" should generate the response "What freakin&#039 spoon?" It makes much more sense to ask "If there is a spoon, then what color is the spoon?" so the response can be<BR><BR>"There is no spoon."<BR><BR>Sorry, sorry, but it was a valid demonstration!<BR><BR>Anyway, you check EOF/BOF to ensure that you know where you stant in relation to your data. If you&#039re not at the beginning or end of what is clearly a recordset, then you should be inside of it. EOF is generally more useful than BOF, as record sets go to their first record (not BOF) when they are opened. If there are no records in your record set, then both BOF and EOF are true, since you are both at the beginning and the end of a shockingly short recordset.<BR><BR>HiH

  3. #3
    Martin Guest

    Default RE: rs.EOF,rs BOF,

    I meant with the basic language mate<BR>sorry could not get it again<BR>i guess i am a loser shoot

  4. #4
    SPG Guest

    Default RE: rs.EOF,rs BOF,

    You mean along the lines of<BR><BR> set objRS = objConn.execute "select foo from bar"<BR> do until objRS.eof<BR> response.write objRS("foo") & "<BR>"<BR> objRS.moveNext<BR> loop<BR> objRS.close<BR> set objRS = nothing<BR><BR>?(note that that&#039s slow [therefore evil] code)<BR>Opens a recordset and, until it gets to the end of the recordset, prints out the "foo" field of each record and moves to the next record. Then it closes and destroys the recordset.<BR><BR>Was that more along the lines of what you needed?

Posting Permissions

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