Home > MS Access > ADODB Command.Execute does not return error for RAISERROR

ADODB Command.Execute does not return error for RAISERROR

December 4th, 2008 Leave a comment Go to comments

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.

Solution:

Check your stored proc. It is likely that it will not have statement

SET NOCOUNT ON

Place this statement as a first statement in procedure and your VBA code will halt for error raised by RAISERROR.

Categories: MS Access Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.