>I'm trying to develope a COM server than work on a company NT4 server and make on it all the hard work of query.
>I need, however, access to cursor created by the COM server from the client.
>I've read that this is possible using Data Access Objects (DAO).
>Is there someone who can tell me how to do this ? Any example....
>My table are Visual Foxpro tables, we dont use SQL databases.
>
>Thanks, Luca
You probably mean ADO (ActiveX Data OBjects). Returning an ADO recordset from a VFP COM object is pretty straightforward with the new VFPCOM utility. (Actually, it was straightforward before too: boh Rick Strahl and Ken Levy wrote conversion classes in VFP long before VFPCOM was released.)
To do this in your COM server, you need to install the VFPCOM utility on the machine where he COM server runs. Then you create the ADO rs like this:
SELECT * FROM MyTable WHERE SomeField = .T. INTO CURSOR MyCursor
oCOMUTil = CREATEOBJECT("VFPCOM.ComUtil")
oRS = CreateObject("ADODB.Recordset")
oComUtil.CursorToRS(oRS)
RETURN oRS
Then the client app can use the ADO rs.
Erik Moore
Clientelligence