RowSet Database Exception from Stored Procedure SQL Server

I have a stored procedure in an MS SQL Server database that could raise an error if the parameters that’s passed into the stored procedure are invalid.

How should I pass this error (and error message from the database) to the web app?
If I execute the stored procedure from the web app and return the query to a RowSet, that could fail if a database error is raised.

THROW ? THROW (Transact-SQL) - SQL Server | Microsoft Docs

And in Xojo capture the exception in a TRY CATCH ?

Make a test.

Thanks - I didn’t realise the error message was coming through to Xojo as a DatabaseException

1 Like