
How to return a DAO Recordset from an ActiveX EXE (vb4 16bit)
I've been trying to figure this out for a while.
I've got an app. that calls a method of an out of process server that
returns a recordset object e.g.
Server Object
-------------------
Public Function GetMyRecordset(byval sQuery$) as Recordset
Dim recRes as Recordset
Set recRes = MyDb.OpenRecordset(sQuery)
set GetMyRecordset = recRes
exit function
I call this object method from within my application in the normal way e.g.
dim resReturnResults as Recordset
set resReturnResults = objMyObject.GetMyRecordset(sMyQuery)
There is no error generated at either end, the recordset gets created in
the
server, no problem. But the object doesn't get returned i.e.
resReturnResults
doesn't get instantiated. I can't figure out what I'm doing wrong!
Any ideas ?
Thanks,
Steve