Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to force a COMRETURN ERROR
Message
 
To
24/02/2005 20:41:09
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00990304
Message ID:
00990411
Views:
14
Well, you're dealing with HTML response that has to be sent to the client. So, no matter what kind of errors that happen on the back end, you need to return a response to the client. Here, on UT, I have a hidden frame that serves to display alert box occasionnaly. By that, I don't have to return a full HTML but simply a one liner to the hidden frame that says to display an alert box on another frame. That could be used to display the error. Or, if you wish to return the data in the actual frame, you will probably want to return an error page, such as a template where you can replace the error variable with the actual error.

Great - I [also] use a "launch" frame to fire alerts or set control states in other frames. This level of java is new to me.

My intent was to fire an alert with an error report (from the "launch" frame) should an error occur. I did a one time "sport" project that implemented COMRET, but in that case the client was a VFP gui with an on error. This seems to imply COMRET is bound to a VFP ON ERROR. With a browser client, there is no ON ERROR for COMRET to bind with.

IOW with isapi/mtdll/browser COMRETURNERROR may not be necessary. Would that be correct?

My hope is that COM's error method (MTDLL) will clear the error without crashing the server AND that it could be as simple as:
define class myserver olepublic
procedure error
lparameters lcFormsVars,lcIniFile,lnReleaseFlag
local lcOutput
on error
aerror(arErrors)
cErrors=""
FOR c=1 TO ALEN(arErrors)
cErrors=cErrors+TRANSFORM(arErrors(c))+CR
ENDFOR
lcOutput=;
[<html><head><script type="text/javascript">]+CR+;
[alert("]+cErrors+[")]+CR+;
[</script></head><body><form></form></body></html>]+CR
return lcOutput
endproc
enddefine
Thanks
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform