Thanks Craig. I had read that before and I hate to say its still pretty greek to me. The help fails to provide an example that would be really helpful. AS I read it, we would still need something to trigger the COMRETURNERROR() call. What would that be? and how would we access the returned value from an ASP page?
>Look at COMRETURNERROR() in VFP help.
>
>>I could use a simple explanation of how to deal with error handling in a COM server dll. My server is patterned after the Rick Strahl's whitepaper on the subject. As such it includes a property (lError) and a function
>>
>>function error
>>lparameters nError,cMethod, nLine
>>this.cErrorMessage = ""
>>this.cErrorMessage = this.cErrorMessage + "<br>Error No: " + str(nError)
>>this.cErrorMessage = this.cErrorMessage + "<br>Method: " + cMethod
>>this.cErrorMessage = this.cErrorMessage + "<br>Line No: " + str(nLine)
>>this.cErrorMessage = this.cErrorMessage + "<br>Message: " + message() + message(1) + "<HR>"
>>endfunc
>>
>>The other functions in the server include:
>>this.lError = .F.
>>which initializes the property. Now, what I don't quite understand is what triggers the error function and how do you get cErrorMessage returned to the calling routine, in this case it would be an ASP page. Rick tried to explain this to me but frankly the answer was too cryptic for my simple mind.
>>
>>My other question is if this is the best way to handle the whole error handling business, or would it be better to use TRY/CATCH syntax in the actual server functions?
>>
>>Some general instruction on this subject would certainly be appreciated.
>>Thanks
>>- Don