Re: Weird Stored Procedure Problem - stopping without any errormessage



My first guess would be that you don't have SET NOCOUNT ON in all of your
procs. If you haven't already done so, add it to the beginning of all of
the proc to see of that fixes the problem. SET NOCOUNT ON will suppress
DONE_IN_PROC messages that are returned to ADO apps as empty/closed
recordsets and can cause problems if your application isn't expecting them.

Also, consider revisiting the SQL code to eliminate the cursor(s).
Set-based processing usually performs much better than cursors. Cursors are
seldom required and often used only because the developer is more familiar
with procedural processing.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Christian Peterek" <spam_den_chris@xxxxxx> wrote in message
news:du1ehb$9s2$1@xxxxxxxxxxxxxxxxxxxx
Hi NG,

Currently I am encountering a weird problem, which even the big google
could not fix.

I've got a stored procedure(SP), that calls two other stored procedures.
SP1 (which i call from the classic asp) calls first the SP2 and then the
SP3.
But for some reason, the SP3 just aborts it's work somewhere in a cursor
loop, which makes SP1 stop, too. No SP throws any error message.

The weird thing is, that if I call the SP1 from the MS Query Analyzer
(with the same Parameters as from the ASP script), it works as it should.
I scrolled through the Messages window, and there is no error message,
too. So I assume, that the SPs are correct.

I added a "debug print" to the SP1 and SP3, that just inserted lines into
a table. I added these lines to the both while loops in the SP3 and every
time I ran it from asp, the loops stopped at another position (somewhere
close to each other but still it was always another position-count that
was "printed" to the table), but the parameters, and the work the SP had
to perform did not change.

As I multiplied the debug print ( had the SP3 to write 6 times per loop to
the log table) the SP3 aborted even earlier, when called from asp. But not
from the Query Analyzer.

*I even tried different ways to use the ADODB.Connection object, but the
effect was always the same.
*I can rule out that the problem is connected to authentication
difficulties or something like that.
*I tried to call the SP1 with and without the transactions.
*I'm sure that the SPs are all working and correct, throwing no errors.
*Running the SP1 from the Query Analyzer takes about 1 second. So its not
a Timeout problem.
*Calling SP3 from ASP alone works.

So are the questions:
* Is there any Query / Statement limit?
* Can I do anything to solve the problem?
* Any other Ideas?

Thanks for your help,

Chris


X-POST:microsoft.public.sqlserver.programming
X-POST:microsoft.public.scripting.vbscript
X-POST:microsoft.public.inetserver.asp.db
FOLLOWUP-TO:microsoft.public.inetserver.asp.db


.



Relevant Pages

  • Re: Why did Microsoft release SP3 for Office?
    ... deposited - then we get an error message stating "Cannot start Outlook. ... installing SP3, ... I clicked to install from Windows update and let it run as usual. ...
    (microsoft.public.officeupdate)
  • Re: Share point Services ASP.NET error
    ... That must have been a change in functionality that SP3 provides that I missed. ... generally everything is under ASP 1.1. ... pools, so two versions of the framework do not try and load in one ... all our SharePoint portals into their own pools; ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Unable to publish asp pages
    ... I've uploaded my site by removing all Database connections, ... Now I get the Error message that "....could not Parse". ... > have you host reinstall them and try opening your online web in FP ... > | I found that deleting the changed asp page allowed publication ...
    (microsoft.public.frontpage.programming)
  • Frontpage modules not running
    ... "Module1" contains Public Function statements that are called up ... I run the asp page. ... The error message occurs even if the function is reduced to: ... Public Function MaxConfirmedOccupancy(dateFirstNight As Date, ...
    (microsoft.public.frontpage.programming)
  • Re: XP-Pro: Unable to upgrade to SP3
    ... You may have more luck if you download the complete SP3 ... version of the installation. ... Windows XP Service Pack 3 Network Installation Package for IT ... the error message is "not enough storage ....". ...
    (microsoft.public.windowsxp.general)

Quantcast