Solved

Stored procedure returns no records - handling error message.

Posted on 2004-10-11
5
494 Views
Last Modified: 2012-08-13
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!
0
Comment
Question by:rsoble
  • 2
  • 2
5 Comments
 
LVL 18

Accepted Solution

by:
Data-Man earned 400 total points
ID: 12278552
Try putting

DoCmd.SetWarnings False
DoCmd.OpenStoredProcedure
DoCmd.SetWarnings True

Mike
0
 
LVL 1

Author Comment

by:rsoble
ID: 12278592
Great, thanks!  And so fast too :-)
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 12278626
13 minutes is slow for this forum...Glad I could help....Mike
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12278656
Hmm, how about:
CurrentDb.Execute "Exec MyStoredProcedure"
0
 
LVL 1

Author Comment

by:rsoble
ID: 12278719
>> 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.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question