Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return values to the client from a com server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00430797
Message ID:
00430806
Views:
8
You need to use a RETURN something here in your method. Because you want to pass back two variables, I would pass an object back with two custom properties. Instead of your ? lines, use:

oReturn = createobject("custom")
oReturn.AddProperty('customerID',mytable.id)
oreturn.AddProperty('customername',mytable.customername)
return oReturn

From your program just use:
omydcom = createobjectex('mydcom','someothermachine')
oCustomerInfo = omydcom.Showrecord()

>Hi to all:
>
>I don't know how to return a field value or a variable from a com server.
>For example:
>
>DEFINE CLASS mydcom as custom olepublic
> Name=mydcom
> PROCEDURE showrecord
> USE mytable in 0
> SELECT mytable
> ? mytable.id
> ? mytable.customername
> ENDPROC
>ENDDEFINE
>
>Then when I call showrecord method from the client machine, the fields value are shown in the server.
>How I can pass the fields values back to the client?
>
>Thanks.
>
>Pedro Giraudi.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform