C
charlie
Hi there,
My asp.net application uses methods in classes to do database updates.
So for example on any given page when a user clicks the submit button, my
click event might call three different methods each of which opens a
database connection, updates a table, and closes the connection. This
doesn't seem very efficient. I think I've been told not to worry about it,
that the connections are pooled or something. Can I create a connection and
pass it to multiple class methods one after the other so that they all use
the same connection? If I could would it be worth it?
My asp.net application uses methods in classes to do database updates.
So for example on any given page when a user clicks the submit button, my
click event might call three different methods each of which opens a
database connection, updates a table, and closes the connection. This
doesn't seem very efficient. I think I've been told not to worry about it,
that the connections are pooled or something. Can I create a connection and
pass it to multiple class methods one after the other so that they all use
the same connection? If I could would it be worth it?