Board index » delphi » Multiple connections opened to MS SQL 6.0

Multiple connections opened to MS SQL 6.0

Whenever I open a Ttable one more connection to the SQL Server is added.
It remains opened until I close the table. I have read in this
newsgroup an answer to somebody that had the same problem, and the
advice was to connect to a TDatabase instead of using alias. I have
tried this, and if I use TQuery and connect to a TDatabase, only one
connection is opened, but this doesn't work with tables.
Some ideas?
 

Re:Multiple connections opened to MS SQL 6.0


In article <317FD05F.6...@bitmailer.net>, Pedro Garcia Dieguez <pe...@bitmailer.net> wrote:

Quote
>Whenever I open a Ttable one more connection to the SQL Server is added.
>It remains opened until I close the table. I have read in this
>newsgroup an answer to somebody that had the same problem, and the
>advice was to connect to a TDatabase instead of using alias. I have
>tried this, and if I use TQuery and connect to a TDatabase, only one
>connection is opened, but this doesn't work with tables.
>Some ideas?

As far as I know, Delphi doesn't use bi-directional cursors to MS-SQL.  
Therefore, the BDE is using SQL queries to get the data anyway.  If that is
the case, you might as well use TQueries anyway.  You'd have to run some
benchmarks to test it tho.

Cheers, Simon

Other Threads