Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create com+ components
Message
From
12/05/2004 06:24:35
 
 
To
11/05/2004 23:11:53
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00902994
Message ID:
00903103
Views:
17
I am calling that component from a web service written in C# to update a few Fox tables.

>Not necessarily. It depends on what you're doing with the component. What do you want to use COM+ (now called Enterprise Services) for? Transaction support? Queued Components? If Transaction support, what database are you using?
>
>
>>DEFINE CLASS Math AS SESSION OLEPUBLIC
>> FUNCTION Multiply(tnNum1, tnNum2)
>> LOCAL lnResult, loMtx, loContext
>>
>> * Create a reference to the MTS object
>> loMtx = CREATEOBJECT("MTXAS.APPSERVER.1")
>>
>> * Create a reference to the context object
>> loContext = loMtx.GetObjectContext()
>>
>> lnResult = tnNum1 * tnNum2
>>
>> * Commit the transaction if there is one and
>> * tell MTS that we're done using the component
>> loContext.SetComplete()
>>
>> RETURN lnResult
>> ENDFUNC
>>ENDDEFINE
>>
>>Is that a typical COM+ code? Every COM+ class should have this code, right?
>>
>>>You could look at the articles I wrote for FoxTalk a couple of years ago. They're now on the MSDN web site. Links are at http://articles.craigberntson.com
>>>
>>>>How do we create COM+ components in VFP8?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform