Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Database

Status
Not open for further replies.

Saturn57

Programmer
Aug 30, 2007
275
CA
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).

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top