temporary storage of data
-
Hi guys, I have a datagrid (
myGrid
) populated with a dataset (myDS
)myDS
is fetched and saved using a web service. everything is working fine. I need an additional functionality of keeping changes (any changes) made on the page temporary until the user clicks on "Save and Finalize
" button (btnSave
) Can someone please point me in the right direction on how to go about implementing this stuff. Much appreciated. regards, Noman Nadeem :zzz: -
Hi guys, I have a datagrid (
myGrid
) populated with a dataset (myDS
)myDS
is fetched and saved using a web service. everything is working fine. I need an additional functionality of keeping changes (any changes) made on the page temporary until the user clicks on "Save and Finalize
" button (btnSave
) Can someone please point me in the right direction on how to go about implementing this stuff. Much appreciated. regards, Noman Nadeem :zzz:Hi Noman. Does "temporary" in this context mean "not persisted to a database"? If so, that should be straight-forward. You could keep the dataset persisted in a Session variable, making changes to it accordingly throughout the session. When the user clicks "Save and Finalize", then run your code to take the Session variable dataset and persist to a database.
-
Hi Noman. Does "temporary" in this context mean "not persisted to a database"? If so, that should be straight-forward. You could keep the dataset persisted in a Session variable, making changes to it accordingly throughout the session. When the user clicks "Save and Finalize", then run your code to take the Session variable dataset and persist to a database.
Hi Mike, thanx for the input, I was kind of hoping for another solution. I ran into a strange problem using the session, maybe u have a solution. First of all, it is an oracle DB. I have an ID field which has to be incremented by value 'x' upon each insert. I'm using
myDataView.RowFilter = "type_id = max(type_id)"
I get the max inserted ID and increment by 'x' I add usingmyDataSet.TABLE_NAME.AddRow(blah blah);
The first insert works just fine. The next time I get theVersionNotFoundException
upon setting theRowFilter
formyDataView
. I can resolve this by adding the codemyDataSet.AcceptChanges()
, BUT in this casemyDataSet.HasChanges()
returns false in my finalize code. My final resolution was make a copy of the dataset,AcceptChanges()
for the copy and apply theRowFilter
. If you /anyone can suggest a better approach, I would love to check it out. regards, Noman Nadeem :zzz: