I
ion
In my application I use typed datasets as my data container classes (data
persistence). My db structure has many table relations (mostly one to one).
I have main table that maps to 4 different tables using an ID which is auto
incremental. So, when I persist this info while the user inputs it, I do
not know these values until I update the db (use stored procedures and
return SCOPE_IDENTITY() ). I update the db asynchronously at the end of
the user input and the user submits the data to be saved. So, what I do is
break up the update in order and return each id and save to the main typed
dataset and then that will be the final update. My question is this the
best way to do this? I know I can let ADO.Net automatically update the
tables with data relation however should I trust this? It seems to me that
I have to update backwards by savings the outer tables before saving the
main table. Any suggestions on handling auto incremental values when
updating values on the client?
Thanks
persistence). My db structure has many table relations (mostly one to one).
I have main table that maps to 4 different tables using an ID which is auto
incremental. So, when I persist this info while the user inputs it, I do
not know these values until I update the db (use stored procedures and
return SCOPE_IDENTITY() ). I update the db asynchronously at the end of
the user input and the user submits the data to be saved. So, what I do is
break up the update in order and return each id and save to the main typed
dataset and then that will be the final update. My question is this the
best way to do this? I know I can let ADO.Net automatically update the
tables with data relation however should I trust this? It seems to me that
I have to update backwards by savings the outer tables before saving the
main table. Any suggestions on handling auto incremental values when
updating values on the client?
Thanks