That depends on how things are structured.
If all the data calls are in one method and all one after the other without
a lot of processing in between, then you open the connection, make all the
calls, and close it.
If each data call is in its own method, then you are better off having each
method manage its own connection. This will scale better and be far more
maintanable in terms of code.
<mi*********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
In web pages that require many calls to a database is it better to hold
the connection open while all the calls are completed, or should the
connection be opened and closed for each query? It seems like the
former is the obvious choice, but whenever I try to create re-usable
data driven controls it seems easier to go with the latter.