I am writing a DLL that is to be used from ASP.
some functions in my classes have to return a REcordset.
of type ADODB.REcordset.

here is how I wrote the functions :

Code:
public function GetUsers (Catid as Integer) as ADODB.Recordset

dim Rec as ADODB.REcordset
  
[ ... perform any selection from database ... ]

  'Store Results in REC

   ' Return Results
   Set  GetUsers = Rec


End function


In ASP I used the following code to call this function:


Code:
<%
 Dim COmObj
 DIm Rec 

 Set Rec = Server.CreateObject("ADODB.REcordset")
 Set ComObj = Server.CreateObject("MyObj.MyClass")

  Rec = COmObj.GetUSers(10)
%>
bu I am getting an Error in My Dll "Object or Block Variable not Set"

now it is clear some thing is wrong. But what.
Please any help is greatly appreciated.