Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
ok. i have a database with a good many tables and relationships. i have this reflected in the dataset ive created, so its an exact replica of my database. i want to be able to add a new record. does this mean that the insert command of my data adapter will be a huge command, inserting data into each of the 10 or so tables that data is entered into? ive used datasets and inserted data into one table at a time, but never more than one table. how do i do this if i have many tables to insert data into at once?
Posted

A dataset should map to the business process being solved not the ERD if this company is of any size. Unless this is a new company, if the ERD is modeled after a business process then a dba should be fired, if the dataset matches the ERD then the developer should be fired. A table in the database may only have 3 or 4 columns out 40 that you are interested in for you're business process. It a waste of bandwidth and memory to track those other 36 columns. Its very rare that a business process follows an ERD diagram (unless it's a small project or a small/start up company) - there may be similiarities, but the more complex the company, the further from similiarities between the database ERD and dataset layout you should be.

 

As far as your question. If when you created the dataset you had on Update/Delete/Insert being cascading events then the insert statement for each table will be called. If you don't then, yes you'll need a big ugly insert/update command.

Posted

If when you created the dataset you had on

Update/Delete/Insert being cascading events then the insert statement for

each table will be called. If you don't then, yes you'll need a big

ugly insert/update command.

 

 

can you explain this a bit more please. my understanding is that if i have an insert command on the dataset, and set it as a cascading event( dont know how to do this) it will updatae each table that needs to be updated? can you elabourate to help my understanding? thanks

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...