SQLConnection Dillema

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?
 
C

Cor Ligthert

Cablito,

Do you think you have with these messages enough for some days as answer on
your question?

http://tinyurl.com/5djng

I selected them to only one person (with the most complete answers about
this subject)

I hope this helps?

Cor
 
C

Cablito

Thanks for the answer... geeses is my english comprehention that bad or do
you write like yoda talks?

jk... thanks!
 
C

Cor Ligthert

Cablito,

Sometimes I loose some words when I am typing, when I than reread it, than I
see as well often that I can go directly in Star Wars. However sometimes I
correct it afterwards that much that it is the same unreadable. (not to
mention the to one person what had to be from one )

However in my opinion are there more than enough answers in those messages
which answer completly your questions.

:)

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top