Solved

Stored procedure returns no records - handling error message.

Posted on 2004-10-11
5
495 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Excel ADO SQL question 8 45
ms access - Helpdesk ticket system 5 42
Want my table columns to autofit. 7 56
Access Report via Windows Desktop Shortcut 12 36
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…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

739 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