General information
Category:
Coding, syntax & commands
Hello all,
How can remove the latest error from the AERROR() function ?
What I actually try to do is the following :
In a COM Server method I Have in the Error method the following code :
******** Error Method on the server
LPARAMETERS nError, cMethod, nLine
Local lcRetVal
lcRetVal = ALLTRIM(STR(nError)) + ": " + MESSAGE() + ;
" on Line " + ALLTRIM(STR(nLine))
COMRETURNERROR(cMethod, lcRetVal)
******** on the client
OX=CREATEOBJECT('MYSERVER.SERVER')
ON ERROR lerror = .T.
OX.TESR
X=AERROR(my_array)
IF X>0
MESSAGEBOX('CALL ADMIN')
MESSAGEBOX('' + my_array(1,2), 'CALL ADMIN')
endif
ON ERROR
The problem is that the AERROR always have the latest error and cannot be refreshed unless I exit VFP
The is any way to catch the OLE errors and show my own messages ?
Thanks in advance
Petros
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only