Bonnie
When we're on the subject can you clear something up for me, please.
When I design classes I do it visually (.vcx), so, how would I implement the change you suggested yesterday i.e., specify the type of the return value in the class designer:
"Function Myfunc(param1 as String) as String"
Since then I have learnt to build my dll programmatically and did implement the change you suggested, but with the same result.
Here is my code for the GetStudent method. When I call the DLL I get the correct result. When I build the Web Service and call it, -3 is returned. This tells me it cannot open one or both of the tables. Is there something I'm missing with regards to Web Services and VFP data?
*****
lparameters cCountType as String, cDataPath as String, iSession as Integer, cCode as String, cMcode as string, ;
cLevelType as String, cLevelVar as String, lDistinct as Boolean
local iRecCount as Integer
iRecCount = -1
this.cDataPath = addbs(cDataPath)
this.iSession = iSession
this.cCode = alltrim(cCode)
this.cMcode = alltrim(cMcode)
if between(cCountType, "1", "7")
if !used('enr') and !used('course')
if this.opentable('ENR') and this.opentable('COURSE')
if empty(cLevelType)
iRecCount = this.runselect(cCountType, lDistinct)
else
this.cLevelType = upper(cLevelType)
if between(this.cLevelType, 'A', 'D')
if !empty(cLevelVar)
this.cLevelVar = cLevelVar
iRecCount = this.runselect(cCountType, lDistinct, .t.)
else
**** empty level code
iRecCount = -5
endif
else
**** code is out of range
**** empty level code
iRecCount = -4
endif
endif
use in enr
use in course
else
**** an error has occured opening the table
iRecCount = -3
endif
endif
else
iRecCount = -2
endif
return iRecCount
******
Many thanks for taking the time to look at this.
Regards
Paul
ps How do I highlight the code in the message window. Thanks.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement