fguihen Posted November 9, 2005 Posted November 9, 2005 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? Quote
bri189a Posted November 10, 2005 Posted November 10, 2005 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. Quote
fguihen Posted November 11, 2005 Author Posted November 11, 2005 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 Quote
bri189a Posted November 12, 2005 Posted November 12, 2005 It would be far simpler to point you to the sources of my knowledge than to write the paragraphs it would take to explain: http://www.google.com/search?hl=en&lr=&q=site%3Amsdn.microsoft.com+DataSet+Cascade+Update&btnG=Search http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdataruleclasstopic.asp http://msdn.microsoft.com/msdnmag/issues/02/11/DataPoints/ http://www.functionx.com/vbnet/adonet/relationships.htm http://www.google.com/search?hl=en&q=DataSet+Cascade+Update&btnG=Google+Search Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.