Recordset's properties not available?

Results 1 to 2 of 2

Thread: Recordset's properties not available?

  1. #1
    A.J. Hughes Guest

    Default Recordset's properties not available?

    I have built a very simple server component which has a search method which returns a recordset containing search results. When I take the resulting recordset in ASP and try to do an rs.movenext, rs.eof, or any other method or property, I get an error that the object doesn&#039;t support that method. However, I can display the first record. This seems very odd to me, and I am wondering if anyone knows what I have missed here.<BR><BR>ASP Code:<BR><BR>Set oAddBook = Server.CreateObject("ReQAddBook.modAddBook")<BR>Se t rs = Server.CreateObject("ADODB.RecordSet")<BR><BR>rs = oAddBook.Search("DSNName","FName",request("FName") )<BR><BR>rs.eof &#039;this statement generates an error<BR><BR><BR>Header from VB Component:<BR>Public Function Search(DSN As String, FieldName As String, Value As String) As ADODB.Recordset

  2. #2
    Join Date
    Dec 1969

    Default Two things wrong...

    &nbsp;<BR>(1) Doing this:<BR>&nbsp; &nbsp; &nbsp; &nbsp; Set rs = Server.CreateObject("ADODB.RecordSet") <BR>is a waste of time! Since the very next thing you do is ignore that object you created and assign something *else* to the same variable!<BR><BR>(2) And where is the SET in this line:<BR>&nbsp; &nbsp; rs = oAddBook.Search("DSNName","FName",request("FName") ) <BR>Hmmm??? Hey, you used one for the first assignment, why did you think you didn&#039;t need one for the second? No SET, no object reference. Period. See the thread of this nature in the Advanced forum, if you care why things are happening.<BR><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