I have a form that is linked to a sql table. I enter data in several boxes and hit the save button and then that data is saved to the database. Is there a way to have it be saved to the database as soon as it is entered in the text box.
this is not a good practice as it requires an open database connection for an extended period of time, or the opening and closing of a connection for each field change. either way it's a poor utilization of resources.
the concept behind ado.net is to disconnect the user from the database as much as possible. open connection, run sql, close connection.
I have found the unit of work pattern is an excellent concept for managing database connectivity (and transactions).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.