Clarion problem with MSSQL and TRY/CATCH block

Hi guys,

I have problems with catching errors using clarion 11 with sql server 2019 database and Sql Server Native Client 11.

To be precise I am not catching all errors when throw/raiserror in try/catch block is used.

I am receiving some errors (always with number 37000 in Trace), but i.e. select 1/0 won’t return anything to Clarion.

To be clear, using such procedure:

Then calling in clarion:

An error does not occur in Clarion. What is more, I don’t have even any track in Trace related to this error.

Also when using triggers with throw/raiserror same behavior occurs. When no try/catch block is used, all error’s are received by Clarion.

I have to use Native Client because we are using MARS.

Did anyone encountered such a problem? Any suggestion will be helpful.

Hey Matt,

Have you tried swapping “NORESULTCALL” for “CALL”?

Maybe it has something to do with returning a result set - I’m spit-balling here, but maybe something to try.


Clarion side add a next () after the first if error…

I think you need that to return the error. Then put another if error after the next.

I think I don’t have this in front of me at the moment…

Sorry for brief reply.