N-Tier Advice

Gazzo

Freshman
Joined
Dec 31, 1969
Messages
25
Location
Durham, England
Hi

Could anybody give me their opinions please?

I am trying to create a simple form in .Net which will display a datagrid containing records retrieved from a database. When a user clicks on a record, textbox's underneath it will be populated with the records values. The user can then Edit or Delete the record, the user can also add a new record.

I want all the data access code to be in a separate dll. The question that I want to ask is: Would it be better to have a component with three separate functions i.e. add, edit and delete and each time a user makes a change a call is made to the appropriate function and update the database then refresh the datagrid or would it be better to actually make the change to the datagrids dataset and then when the form closes send the dataset to a function which has the UpdateCommand, InsertCommand and DeleteCommand already set up against the DataSet and call them in turn?

How has anybody else done this?

Cheers,
Gazzo.
 
Back
Top