Board index » delphi » HELP: D3 - MSSQL 6.5 - number of user connections.

HELP: D3 - MSSQL 6.5 - number of user connections.

I have D3, MSSQL 6.5, and I'm using BDE 4.51

I have a form with a TDatabase component that
is bound to a BDE alias. I then have 2 tables
(InfoPower actually) that are bound to this
app alias (the TDatabase.DatabaseName)...
I open the form, connect the database,
and then open the two tables.

When I go to SQL Server and look at the
current activity, I see a different process ID
(user connection) for each of the two tables.

HOW do I have one user connection for both
tables? My friends all tell me that the TDatabase
component should solve this, but it looks like
it's not.

Any tips?

--michael

 

Re:HELP: D3 - MSSQL 6.5 - number of user connections.


Quote
Michael Farmer wrote:

> I have D3, MSSQL 6.5, and I'm using BDE 4.51

> I have a form with a TDatabase component that
> is bound to a BDE alias. I then have 2 tables
> (InfoPower actually) that are bound to this
> app alias (the TDatabase.DatabaseName)...
> I open the form, connect the database,
> and then open the two tables.

> When I go to SQL Server and look at the
> current activity, I see a different process ID
> (user connection) for each of the two tables.

> HOW do I have one user connection for both
> tables? My friends all tell me that the TDatabase
> component should solve this, but it looks like
> it's not.

> Any tips?

> --michael

There seems to be know way around this.  The BDE uses a one connection
per table regardless of the way you hook it up.  I believe this is the
case because of the way it deals with the cursor for the TTable.

The only way to minimize the connections is to use TStoredProc's or
TQuerys..

Hope that helps!

Rkr

--
                   \|||/
                   /'^'\
                  ( 0 0 )
--------------oOOO--(_)--OOOo--------------
. Reid Roman                              .
. Delphi Programmer / Analyst             .
. TVisualBasic:=class(None);              .
. May the Source be With You              .
-------------------------------------------
. Auto-By-Tel (http://www.autobytel.com)  .
. Irvine, CA U.S.A                        .
. E-Mail : rkroman (at) pacbell (dot) net .
. or reidr (at) autobytel (dot) com       .
-------------------------------------------

Re:HELP: D3 - MSSQL 6.5 - number of user connections.


Don't use tables, use Tquerys
Make sure the tquerys use the database component's database name
and not the alias name as the database name.

Quote
Michael Farmer wrote in message <3558CD3E.4...@mindspring.com>...
>I have D3, MSSQL 6.5, and I'm using BDE 4.51

>I have a form with a TDatabase component that
>is bound to a BDE alias. I then have 2 tables
>(InfoPower actually) that are bound to this
>app alias (the TDatabase.DatabaseName)...
>I open the form, connect the database,
>and then open the two tables.

>When I go to SQL Server and look at the
>current activity, I see a different process ID
>(user connection) for each of the two tables.

>HOW do I have one user connection for both
>tables? My friends all tell me that the TDatabase
>component should solve this, but it looks like
>it's not.

>Any tips?

>--michael

Other Threads