Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...