Define Class DataRetriever As line OlePublic procedure Init set talk off set deleted on set exclusive off set notify off set safety off endproc Procedure Get_EmployeesQueueData(tcDatabase as String, ; tdDate as Date, tcAlias as String) As String Local lcXML As String lcXML = "" open database (m.tcDatabase) shared set database to (m.tcDatabase) external procedure GetEmployeesQueuesInfo =GetEmployeesQueuesInfo(m.tdDate, m.tcAlias) =strtofile('Run SP', 'myLog.txt',1) if used(m.tcAlias) cursortoxml(m.tcAlias, 'lcXML', 0, 0) =strtofile('Produced XML', 'myLog.txt',1) endif Return m.lcXML endproc Procedure Get_EmployeeQueueData(tcDatabase as String, ; tcUsGrLink_fk as String, ; tcQueue_Names_fk as String, tTimeStart, ; tTimeEnd, tlPrimary, tcAlias as String, tlNoData) As String Local lcXML As String open database (m.tcDatabase) shared external procedure GetEmployeeQueues =GetEmployeeQueues(m.tcUsGrLink_fk, ; m.tcQueue_Names_fk, ; m.tTimeStart, ; m.tTimeEnd, ; m.tlPrimary, ; m.tcAlias, m.tlNoData) cursortoxml(m.tcAlias, 'lcXML', 0, 0) Return m.lcXML endproc EnddefineNow I'm trying this class as
o = createobject('DataRetriever.DataRetriever') ?o.Get_EmployeesQueueData("t:\it_testing\data\mmviscollect.dbc",date(),'cTest')And it gives me an error 11. However, if I just create a procedure as a regular program, it works just fine. I'm probably missing something simple. Do you know, what should I do to make it work?