> loMtx = CREATEOBJECT(“MTXAS.APPSERVER.1”)
>
>>************************************************** >*-- Class: myserv (c:\development\comserv\classes\myserv.vcx) >*-- ParentClass: custom >*-- BaseClass: custom >*-- Time Stamp: 10/11/04 04:35:01 PM >* >Define Class myserv As custom OlePublic > > > Name = "myserv" > classlogic = .F. > Dimension classlist[10] > > > Procedure Init >&& test > If !Used("statemnt") > Use l:\Shared\statemnt In 0 Order wcode Shared > Endif > For x = 1 To 10 > This.classlist[x] = ' ' > Endfor > This.classlogic = 'S' > Endproc > > > Procedure checkrec >&& checkrec > Lparameters cClass > Local lanswer, i, cPattern > > Set Exact On > > lanswer = .T. > If This.classlogic = 'I' && Ignore classes > Return lanswer > Endif > > If This.classlogic = 'D' && Skip 'Deleted' classes all begin with 'D' > If (Left(cClass,1) = 'D') > lanswer = .F. > Return lanswer > Endif > Endif > > If This.classlogic = 'S' && Skip listed classes > If (Ascan(This.classlist,cClass) > 0) And !Empty(cClass) > lanswer = .F. > Return lanswer > Endif > For i = 1 To 10 && test for wildcard chars in skipped class codes > cPattern = Alltrim(Upper(This.classlist[i])) > If (At('*',cPattern) > 0) && wildcard > If Like(cPattern,cClass) > lanswer = .F. > Return lanswer > Endif > Endif > If (At('?',cPattern) > 0) && wildcard single char > If Like(cPattern,cClass) > lanswer = .F. > Return lanswer > Endif > Endif > Endfor > Endif > > If This.classlogic = 'P' && Print only listed classes > lanswer = .F. > If (Ascan(This.classlist,cClass) > 0) And !Empty(cClass) > lanswer = .T. > Return lanswer > Endif > For i = 1 To 10 && test for wildcard chars in include-only class codes > cPattern = Alltrim(Upper(This.classlist[i])) > If (At('*',cPattern) > 0) && wildcard > If Like(cPattern,cClass) > lanswer = .T. > Return lanswer > Endif > Endif > If (At('?',cPattern) > 0) && wildcard single char > If Like(cPattern,cClass) > lanswer = .T. > Return lanswer > Endif > Endif > Endfor > > Endif > > > Return lanswer > Endproc > > >*-- eia match > Procedure match > && will be called by client to get records meeting the correct criteria > Lparameters cCollector, cAcct > Local lcReturn,loMtx, loContext > loMtx = CREATEOBJECT(“MTXAS.APPSERVER.1”) && <<<<<<<<<<< OFFENDING LINE HERE >>>>>>>>>>>>>>>> > > * Create a reference to the Context object > loContext = loMtx.GetObjectContext() > > lcReturn = "" > Select * From statemnt ; > WHERE (acct == cAcct); > AND (collector == cCollector) > > If Empty( Alias() ) Or Reccount() = 0 >* Nothing to do > Else > Cursortoxml( Alias(), "lcReturn", 1, 1 + 8, 0, "1" ) > Endif > * Commit the transaction if there is one > * and tell MTS that we’re done using the component > loContext.SetComplete() > > Return lcReturn > > Endproc > >PROCEDURE error >Local lcReturn,loMtx, loContext > loMtx = CREATEOBJECT(“MTXAS.APPSERVER.1”) > * Create a reference to the Context object > loContext = loMtx.GetObjectContext() > * > * and tell MTS that we’re done using the component > loContext.SetAbort() > return >endproc >Enddefine >* >*-- EndDefine: myserv >************************************************** >