Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging DLL
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Debugging DLL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01125286
Message ID:
01125286
Vues:
57
Hi everybody,

I've created a very simple DLL with this program:
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

Enddefine
Now 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?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform