From the computer of: shamanstears
(737 recipes)
Created: Jan 22, 2008 Updated: Jan 24, 2008
Trying to run an ASP page that pulls from #temp table but you get a nasty message that looks something like this:
This happens because each SQL statement within your stored procedure returns a result. This is a built-in behavior of the SQL Server OLEDB provider (the SQL Server ODBC provider doesn't do this). The result may be a resultset, but if your ASP page is barfing on displaying the resultset, then the result being returned is a count of rows affected.
To stop the SQL Server OLEDB provider from returning the count of rows affected, add the following line to the beginning of your stored procedure:
After you have altered the stored procedure, the ASP page in question should display the desire resultset with no further issues.
Note: Another error that requires the SET NOCOUNT ON line is:
Subscribe to the Tech-Recipes Newsletter
You can get tips like this delivered in your email every week!
We will never, ever sell your email address or spam you.
Related recipes:
Classic ASP: Generate Excel spreadsheets on the fly
Symfony / Propel: How to Left Join
PHP: Password Protect Your pages.
Basic JSP scripting elements
PHP syntax: iterate over an associative array
PHP: Delete or expire a browser cookie
PHP: Print the current year for copyright notices
Using Tagging in your Ruby on Rails Application
Solve PHP error: Cannot modify header information - headers already sent
CSS: Prevent Right-Click Save As on your Webpage Images with Transparent Layers
Sponsored links
Login
Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.Search
Tech Recipes
· Home
· Mac OS X
· Solaris
· Windows
· Programming
· UNIX
· Cisco
· MySQL
· Google
· Instant messaging
· Add recipes
· Leave feedback
· Recommend us
· RSS Syndication
Hot recipes
XP: Small, Free Way to Use and Mount Images (ISO files) Without Burning Them
Make XP look like Windows Vista / Longhorn for free!
Vista: Should I Install 64-bit or 32-bit Version? (x64 vs x86)
Hacks to Beat Rapidshare Download Limits and Waiting Time
How Do I Use or Open Bin, Cue, or ISO Files?
SMS through E-Mail: Cingular, Nextel, Sprint, T-Mobile, Verizon, Virgin Mobile
MySpace Hack: View Pictures and Comments on a Private Profile
MySpace: Hack to Dowload Any Song on Myspace
Who's Online
There are currently, 1964 guest(s) and 1 member(s) that are online.
You are Anonymous user. You can register for free by clicking here
Information
Wish to advertise with us?
All logos and trademarks in this site are property of their respective owner. The comments and forum posts are property of their posters, all the rest © 2003-2007 by QD Ideas, LLC.
Users of this site are legally bound by the Terms and conditions and Disclaimer. Do not use this web site if you do not agree with these policies.
The members, admins, and authors of this website respect your privacy.
Page Generation: 0.93 Seconds
Sun Sep 7 18:09:01 2008