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?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer