Recordset in ASP?

Results 1 to 2 of 2

Thread: Recordset in ASP?

  1. #1
    EvE Guest

    Default Recordset in ASP?

    Hi, I have a VB DLL which returns the recordset I want from an SQL query, unfortunately ASP don&#039t understand that I am returning a ADODB.Recordset, i.e. in ASP:<BR><BR>Dim MyRecSet <BR>Set MyRecSet = Server.CreateObject("ADODB.Recordset")<BR>&#039 create my DLL etc blah-di-blah<BR>MyRecSet = MyDLL.RunQuery(MySQLString)<BR><BR>if MyRecSet.EOF then ....<BR><BR>Error message says "MyRecSet doesn&#039t have a property/function<BR>called EOF." which means that it doesn&#039t see it as a recordset.<BR>Runquery also returns a ADODB.Recordset - so what is happening??<BR>Please also suggest if there is any other way to return a recordset from a function in a DLL. (I don&#039t want to select in ASP - I want my code encapsulated).<BR><BR>Thanks in advance. Any help/suggestions will be appreciated!<BR>

  2. #2
    David Milner Guest

    Default RE: Recordset in ASP?

    If your DLL is actually returning a recordset, then your code should really be this:<BR><BR>Dim MyRecSet<BR>Set MyRecSet = MyDll.RunQuery(MySQLString)<BR><BR>=============== ==============================<BR><BR>If you are just looking to protect your SQL statements, you should really use stored procedures in conjuction with the ADO Command object. You are hurting your performance by trying to return a recordset back through a DLL; so, you should have a really good reason to do it that way.<BR><BR>If you are not sure how to use a Command Object, I can give you some sample code.

Posting Permissions

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