Need an empty ADO RS

Results 1 to 3 of 3

Thread: Need an empty ADO RS

  1. #1
    Jason Miller Guest

    Default Need an empty ADO RS

    I&#039m returning a recordset from a function, but in the event that an error occurs, I&#039d like to return a read-only empty recordset at .eof -- catch being that this is any error, such as "Database does not exist".<BR><BR>Technically, it should return nothing, but then I can&#039t confirm or deny the .eof property.<BR><BR>So, anybody know the sort of syntax for opening a non-existent recordset?

  2. #2
    Join Date
    Dec 1969

    Default RE: Need an empty ADO RS

    After you execute your recordset connection, do a check for <BR>&#060;% if rs.EOF then<BR> xxxx<BR> end if %&#062;<BR>If you want to redirect, open your recordset prior to your &#060;html&#062; tag and do the check. Otherwise, you can simply write a message and response.end.<BR><BR>Hope this helps<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Need an empty ADO RS

    There are probably better methods than what you have indicated for accomplishing your goal...<BR><BR>but if you are really interested in a disconnected recordset try reading:<BR><BR>Professional ADO 2.5 RDS Programming With ASP 3.0<BR>by - John Pappa / Wrox Publishing<BR><BR>It is an excellent guide for disconnected RS/persistent RS/ado in general topics...<BR><BR>Jesse

Posting Permissions

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