ADODB Command.Execute does not return error for RAISERROR

Description: I was executing a stored proc which would halt its execution using RAISERROR. When I tried to run the stored proc in Query Analyzer it worked fine and gave me error but in VBA it couldn’t halt the execution and continued to the next statement.

Microsoft Access: why qdf.execute is not showing any warning?

I had an application in which I had a code like The query was not running because of error but the application was not breaking at the time of error generation. To force the application to break/throw exception write the statement like and by this way we can catch all errors.