C
Cablito
The dilema is simple:
Documents tell you to paranoically close your connections as soon as you are
done with them, to release resources, though I fail to see how much impact
an open connection on a sql server has both for client and server or even
the network.
Now I have an application that besides all the other tasks, such as
inserting records and looking up records, has a "real time" counter. Since
it is a multi-user scenario, this counter has to periodically be updated by
a select count on a table.
So, do I go by the books and, every 5 seconds when I need a new count, I
open a connection, fetch the count, and then close it again or I just keep
an open connection for that? I´d use another connection for the inserting
process due to threading issues.
the sqlconnection object connects really fast to sql as compared to ADO, in
my own experience, but the delay seems to appear when you move to a
production environment where there is network traffic, the sql server is
being hit by monster queries from SAP or Peoplesoft or whatever.
Anyone?
Documents tell you to paranoically close your connections as soon as you are
done with them, to release resources, though I fail to see how much impact
an open connection on a sql server has both for client and server or even
the network.
Now I have an application that besides all the other tasks, such as
inserting records and looking up records, has a "real time" counter. Since
it is a multi-user scenario, this counter has to periodically be updated by
a select count on a table.
So, do I go by the books and, every 5 seconds when I need a new count, I
open a connection, fetch the count, and then close it again or I just keep
an open connection for that? I´d use another connection for the inserting
process due to threading issues.
the sqlconnection object connects really fast to sql as compared to ADO, in
my own experience, but the delay seems to appear when you move to a
production environment where there is network traffic, the sql server is
being hit by monster queries from SAP or Peoplesoft or whatever.
Anyone?