Re: Stored procedure executes twice

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Derrick Pope (DerrickPope_at_discussions.microsoft.com)
Date: 09/16/04


Date: Thu, 16 Sep 2004 09:51:07 -0700

I have used profiler that is how I discovered it was running twice. It is
called with the exact same parameters both times. It is as if ADO on its own
decided to call the SP again.

"Tibor Karaszi" wrote:

> You might want to try to track down what is actually being submitted using the Profiler tool.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
>
> "Derrick Pope" <DerrickPope@discussions.microsoft.com> wrote in message
> news:4CDB46D0-D601-42BB-967D-E97F419A4EB9@microsoft.com...
> >I have a large application. All access to the DB is through ADO Recordsets
> > running in COM+. The programming language is VB6.
> >
> > The ADO recordset executes stored procedures. Some of these stored
> > procedures are quite complex in what they do. In the end they all select a
> > row from the DB and/or status information kept in variables. So I always get
> > some kind of record set.
> >
> > I have had a problem where sometimes the stored procedure gets executed
> > twice from a single call. I have not been able to figure out how to make
> > this happen predictably, which has made trying to solve this very difficult.
> >
> > We are currently still using MDAC 2.5.
> >
> > Is there something in ADO that would cause it to call my SP twice? I have
> > read about FMTOnly setting which is supposed to allow the caller to then get
> > metadata without any rows being returned. If ADO was doing this it could
> > account for what I am seeing.
> >
> > Can anyone help me with this issue?
> > --
> > Thanks,
> > Derrick
>
>
>



Relevant Pages

  • Re: Stored procedure executes twice
    ... "Derrick Pope" wrote in message ... All access to the DB is through ADO Recordsets ... > The ADO recordset executes stored procedures. ... > Is there something in ADO that would cause it to call my SP twice? ...
    (microsoft.public.sqlserver.programming)
  • Stored procedure executes twice
    ... All access to the DB is through ADO Recordsets ... The ADO recordset executes stored procedures. ... Is there something in ADO that would cause it to call my SP twice? ...
    (microsoft.public.sqlserver.programming)
  • RE: Stored procedure executes twice
    ... I set the record set source property to the name of the SP followed by the ... All access to the DB is through ADO Recordsets ... >> The ADO recordset executes stored procedures. ... >> Is there something in ADO that would cause it to call my SP twice? ...
    (microsoft.public.sqlserver.programming)
  • Re: Writing updates from a wide DataTable
    ... In past projects I've used a mix of stored procedures and direct SQL (or ADO ... > Are query plans cached with that? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Stored procedure executes twice
    ... > 'Execute Stored Procedure against Data ... >>>I have used profiler that is how I discovered it was running twice. ... It is as if ADO on ... >>>>> I have had a problem where sometimes the stored procedure gets ...
    (microsoft.public.sqlserver.programming)