Bob,
I found it (see other post) - changing the severity level to > 10 does the trick and makes SQLEXEC return -1 and MESSAGE() get the string from RAISERROR. Just what I wanted!
Thanks any way,
Ken
>>However - when I do the same thing from SPT in VFP - SQLEXEC does not seem to "know" that my error happened (though the record is still correctly prevented from being deleted) SQLEXEC just retruns 1 and assumes eveything is fine. So question, what do I need to do for VFP to realize that the trigger issued a ROLLBACK and a RAISEEROR and to get that message from RAISERROR into VFP for user notification purposes?
>>
>
>That's wierd. Can you return Flase from the trigger. If SQLExec() returns a -1 (negative one) it means there was a problem and you are supposed to be able to use aerror() to get info on the error. But, if you are getting a 1 returned, it seems that SQL doesn't see a problem.
>
>> RAISERROR ('My error message', 10, 1) with SETERROR, NOWAIT
>>
>RaiseError sounds like something that would create a COM Event. Is that valid for ODBC access, or only for COM access?
>
>BOb
Ken B. Matson
GCom2 Solutions