Returning an ADO Recordset to a client

I am trying to return an ado recordset from an activex exe running on a server to a client program.  I can get the server portion to run, but i get error 429 (cant create activex object) when i run it.  I know the recordset is being created on the server as it prints out its contents before returning.  Here is the code for the 2 programs, written in vb6 enterprise with ADO 2.1  ..

CLIENT ------------------------------------
Dim GetDays As Object

Private Sub Form_Load()
  Set GetDays = CreateObject ("SybaseFunctions.Print", "55dvlpmt")
End Sub

Private Sub cmdPrintLocal_Click()
    Dim rsDays As New ADODB.Recordset
    Set rsDays = GetDays.DaysRecordset()  'Error occurs here
    PrintTable         'Print out the recordset
End Sub

SERVER (ActiveX EXE) -----------------------------------
Dim DB As New ADODB.Connection
Dim RS As New ADODB.Recordset

Public Function DaysRecordset() As ADODB.Recordset
    On Error Resume Next
    GetRecordset   'Opens a connection and sets recordset RS
    Set RS.ActiveConnection = Nothing
    Set DaysRecordset = RS
End Function
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
I suspect your GetRecordset.

I have the following code (modified for you) in a class module and it work just like it is supposed to be:
Public Function DaysRecordset() As ADODB.Recordset
Dim rstTemp as ADODB.Recordset

    On Error Resume Next

    set rstTemp = ADODB.Recordset
    rstTemp.Open "SQL Query", rs.ActiveConnection
    Set DaysRecordset = rstTemp
End Function

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
>On Error Resume Next
You should use different error handling in your GetRecordset and DaysRecordset functions.
So, if your client side ADOR.Recordset is not created, you'll have more info in your Err object.

See mdougan's comments and my code sample in:
scorpionjlAuthor Commented:
I dont see any difference between your recordset and mine, but its working now, so I really dont care either.  Thanx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.