Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM question
Message
De
05/10/1999 23:01:42
 
 
À
05/10/1999 16:25:37
Luca Meroni
Easy Consult S.R.L.
Milan, Italie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00272918
Message ID:
00273044
Vues:
30
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform