Hi there,
I'm using Delphi 2007 via ADO objects to establish a connection to SQL Server 2005 databases.
Since few months, we have some problems with our advantage database server (need to be rebooted every 2 weeks or so), which is accessed from a linked server of SQL Server 2005. We think that maybe there's a property which cause connections to the linked server (ADS) to be duplicated.
Actually, there's only one connection (defined in a datamodule) and all queries are using the same connection.
I considered that using KeepConnection active kept closing connection ignored (from ADODB.TAdoConnection object). Am I right?
1. Using KeepConnection=True ignores all connection.close statement?
2. Using KeepConnection=False disconnects almost every time a query is initialized (that is, setting the connection property, flag IsConnected=True; but when setting SQL string, flag IsConnected=False?);
I prefer to use default settings (KeepConnection=True) since it makes faster apps and less network traffic. But the trailing connections lost is a bad side effect that I need to solve. Is it possible that KeepConnection works well on a SQL Server database but for a linked server, there's always new (duplicated) connection each time a query is launched?
Thanks in advance,
Rej Cloutier
PS Sorry for crossposts : CodeGear (Borland) Delphi Forum.
I'm using Delphi 2007 via ADO objects to establish a connection to SQL Server 2005 databases.
Since few months, we have some problems with our advantage database server (need to be rebooted every 2 weeks or so), which is accessed from a linked server of SQL Server 2005. We think that maybe there's a property which cause connections to the linked server (ADS) to be duplicated.
Actually, there's only one connection (defined in a datamodule) and all queries are using the same connection.
I considered that using KeepConnection active kept closing connection ignored (from ADODB.TAdoConnection object). Am I right?
1. Using KeepConnection=True ignores all connection.close statement?
2. Using KeepConnection=False disconnects almost every time a query is initialized (that is, setting the connection property, flag IsConnected=True; but when setting SQL string, flag IsConnected=False?);
I prefer to use default settings (KeepConnection=True) since it makes faster apps and less network traffic. But the trailing connections lost is a bad side effect that I need to solve. Is it possible that KeepConnection works well on a SQL Server database but for a linked server, there's always new (duplicated) connection each time a query is launched?
Thanks in advance,
Rej Cloutier
PS Sorry for crossposts : CodeGear (Borland) Delphi Forum.