Link to home
Start Free TrialLog in
Avatar of rsoble
rsoble

asked on

Stored procedure returns no records - handling error message.

In my ADP I have a form with button.  When the button is clicked, a stored procedure is run that updates a table in the SQL Database.  This is what I want it to do, and it works just fine.   BUT, I also get a popup box that reads "stored procedure executed but did not return records".    Click OK and it goes away, but I'd prefer if it didn't appear at all, since I'm not expecting my stored procedure to return records.

I'm calling the SP with DoCmd.OpenStoredProcedure

Perhaps there is another way to call it so that it doesn't expect to return records?
Or, is there a way to suppress the error message?  I can't figure out what the error number is.  I put in error handling code but it's not being caught by that.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Data-Man
Data-Man
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rsoble
rsoble

ASKER

Great, thanks!  And so fast too :-)
13 minutes is slow for this forum...Glad I could help....Mike
Hmm, how about:
CurrentDb.Execute "Exec MyStoredProcedure"
Avatar of rsoble

ASKER

>> Hmm, how about:
>> CurrentDb.Execute "Exec MyStoredProcedure"

Just for curiosity's sake I tried this too but it didn't work.  Resulted in a MsgBox popup with a blank message.
Thanks.  The other solution may be clunkier but it works fine for me.