Hi there,
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 duplicate. Actually, there's only one connection (defined in a datamodule) and here's some code to launch a query:
Is code above makes sense? Any missing / extra code?
Is last line (connection close) necessary considering the fact that property KeepConnection of TAdoConnection is set to True ?
Thanks for help,
Rej Cloutier
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 duplicate. Actually, there's only one connection (defined in a datamodule) and here's some code to launch a query:
Code:
var qry: TAdoQuery;
(dtm.cntSQL: TAdoConnection)
qry.Connection := dtm.cntSQL;
if not dtm.cntSQL.Connected then
dtm.cntSQL.Open(sLogin,sPwd);
qry.Close;
qry.Sql.Clear;
qry.Sql.Add(sSQL);
qry.Open;
qry.First;
qry.Connection := nil;
dtm.cnSQL.Close
Is code above makes sense? Any missing / extra code?
Is last line (connection close) necessary considering the fact that property KeepConnection of TAdoConnection is set to True ?
Thanks for help,
Rej Cloutier