Link to home
Start Free TrialLog in
Avatar of jvoconnell
jvoconnell

asked on

Best practices using ADO in web forms

Experts,

newbie question.

I am pulling data from a database and populating some text boxes and combo boxes. The users can edit/delete any of these fields. They can enter new data in a control that may have not contained data to begin with.  The data is populated on the Load event. The user can do what they want and then click a "save" button.

What is a good practice to accomplish this?  If the data adapter/data set are created in the Load, then they aren't available in the button_click, correct? Do you create "global" adapters/data sets?
Or
Would you populate the controls using a data reader and then use a command to update the database from the button click?

Any guidance is appreciated.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jvoconnell
jvoconnell

ASKER

Thank you both for the input. The response by carl_tawn gets me on track for the type of project I'm working on. I wanted to give some credit to jondow as well. I will keep this approach for reference when I do have to work with a large volume of data. Once again, thank you both for your time.