Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Start with COM+ and VFP
Message
De
19/11/2004 17:48:39
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00958650
Message ID:
00963101
Vues:
8
The sample below would be any method code, lets suppose the Click method for a command button, so the method opens the table, then instantiate a COM+ component. The click method also calls one component's method which assumes that it can reference a table already open in the commend-button's click method so that it can SUM the field given to it as a parameter and then return the result. The component's SUM methos code would be like this:
** Component's SUM method.
LPARAMETER tcField
local lnSum
SELECT myTable  && Already open in the click method 
SUM &tcField to lnSum
RETURN lnSum
I hope this has cleared what I intended to explain.

Luis


>I don't get it. What do you mean?
>With COM+ you are using an "external" component, which doesn't have a meaning with VFP cursor.
>
>>Hello again Esparta. I printed and read the articles you pointed me to, they are very, very interesting and show how to setup a component along with security and all the necessary stuff. Well, now my question is...should I take additional considerations regarding Visual FoxPro programming like open tables, indexes, variables, objects and so on? Should I treat my COM+ component like any other object in Visual FoxPro? For example, can I reference an already-open table frmo within my component's method code, like this?
>
>>USE myTable
>>o1=CREATEOBJECT('myCOMComponent')
>
>>** This method sums a given field column and returns the result.
>>myVar= o1.SumCursorColumn(;
>>   'myFieldColumn') && Name of a field of the 'myTable' table already open.
>>? myVar
>>USE in myTable
>
>>--- COM+ con Visual FoxPro 7.0 - Parte 1 ---
>>http://www.portalfox.com/article.php?sid=475
>>
>>--- COM+ con Visual FoxPro 7.0 - Parte 2 ---
>>http://www.portalfox.com/article.php?sid=491
>>
>>--- COM+ con Visual FoxPro 7.0 - Parte 3 ---
>>http://www.portalfox.com/article.php?sid=561
>>
>>--- COM+ con Visual FoxPro 7.0 - Parte 4 ---
>>http://www.portalfox.com/article.php?sid=644
>>
>>Espero te sirva.
>>
>>
>>>Hi friends!
>>
>>>Where can I find good information to start using COM+ with Visual FoxPro? In >other words, how should I coding with COM+ in mind to create DLL components?
>>
>>>Thanks in advance
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform