fguihen Posted November 16, 2005 Posted November 16, 2005 (edited) hi all. just learning all about the ASP.NET datasets. im creating a dataset thats a replica of my database. it took a while, as my database has a fair few tables and relationships, but i have it done. now heres my question. i will be gathering info from a form and adding it to the database. from my reasoning i have deduced that i simply add this data to the correct datatable in the dataset and then use the the dataAdapter.Update() method for each table that i have altered in the dataset. this means i have to have an adapter for each table and write an insert command for each adapter which seems a bit overkill. is there a better way to do this? im afraid i cant simply set the data adapter insert command to a big transaction, as im only using access and it doesnt allow transactions. also, do i have to fill the tables with the data already in the database, or can i just add the new rows? i mean , if i only add the new rows, then update the changes, will the old data all be over written? Edited November 16, 2005 by fguihen Quote
Administrators PlausiblyDamp Posted November 16, 2005 Administrators Posted November 16, 2005 As was pointed out in http://www.xtremedotnettalk.com/showthread.php?t=94730 creating a DataSet that is pretty much an exact copy of your DB schema is not the way to do this, you should create a dataset for each individual business task. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
fguihen Posted November 16, 2005 Author Posted November 16, 2005 i remember that, but i cant think of any other way to solve my problem. i have to gather a lot of info on a patient, on topics such as exercise habbits, sleep habbits, medication, hospital visits and so on. this is the only process i have therefore i only have tables related to this process. so my datset has to be a copy of my database. unless theres a different methodology of thinking about this, which i have not yet grasped 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.