Board index » delphi » MS SQL Server "Connection in USE"

MS SQL Server "Connection in USE"

When we tried to run our APP connected to SQL Server (Delphi 2.01
SQL Links, SQL Server 6.5) we got the message "Connection in use
by another statement". Delphi Tech support said we had too many
queries open at the same time (we had maybe 10 or 15 - hard to tell).
He said there was some setting we had to make on the server to
increase the number of connections (cursors) allowed at one time.

All the settings we found didn't help. Anybody know what knob to turn?

Yeah, we're the same folks who got the "insufficient Memory" errors
when we tried to use Paradox.

Frustrating.

--
Kevin Davidson (ke...@qsinc.com)

* In this world of toil and sin
  Your scalp grows bald, but not your chin. - Burma Sig

 

Re:MS SQL Server "Connection in USE"


Quote
Kevin Davidson wrote:

> When we tried to run our APP connected to SQL Server (Delphi 2.01
> SQL Links, SQL Server 6.5) we got the message "Connection in use
> by another statement". Delphi Tech support said we had too many
> queries open at the same time (we had maybe 10 or 15 - hard to tell).
> He said there was some setting we had to make on the server to
> increase the number of connections (cursors) allowed at one time.

> All the settings we found didn't help. Anybody know what knob to turn?

        The setting is called UserConnections:

        SQL Server Defaults to 15 (5 of which are used
        by SQL Server).  Each connection takes 37K of RAM
        so make sure you have got enough memory.  Each
        Query will take up 1 connection so it is best
        to make good use of them, ie only leaving open
        the ones you really need.

        Never call the Query.Prepare method.  This will
        eat 1 connection per call.

        What I usually do is use dedicated queries for
        my visual controls and use a MiscQuery for general
        use.  Then I only open the dedicated queries when
        the need arises.  This seems to keep my connections
        low (around 5-10) per application.

        brant
        ...

Other Threads