Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
N-tier question
Message
De
17/04/2001 22:39:00
 
 
À
06/02/2001 08:12:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00472865
Message ID:
00496511
Vues:
16
If you use VFP as GUI-tier as "problem domain"-tier you can use array for transfert data between tier.

Small example:

Client:

oServer=CREATEOBJECT("MyLib.MyClass")
oServer.SomeMethod() && open remote table
=COMARRAY(oServer,11)
DECLARE aStruct[1,1]
=oServer.GetStructure(@aStruct)
CREATE CURSOR _DataSet FROM ARRAY aStruct && make empty cursor on GUI

DECLARE aData[1,1]
=oServer.Fetch(@aData)
INSERT INTO _DataSet FROM ARRAY aData && fill cursor on GUI



Server:

FUNCTION GetStructure
LPARAMETER aStr

RETURN AFIELDS(aStr,RemoteCursor)

ENDFUNC

FUNCTION Fetch
LPARAMETER aRecordSet

COPY TO ARRAY aRecordSet ALL

ENDFUNC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform