Solved

Stored procedure returns no records - handling error message.

Posted on 2004-10-11
5
491 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now