M
mb
Hi
I am using strongly typed datasets in my application. I want to delete
a row. Visual studio.net generated the dataset for me using my xsd
file. It also generated functions to add and remove a row. But the
remove function doesnt work properly. The reason being that it in turn
calls the remove function of the datarow. The remove function in
effect calls the delete function and the acceptchanges function of the
datarow. Now if I call update on the dataadapter, obviously the change
is not reflected in the database as acceptchanges resets my delete
flag. Instead if I use the delete function directly on my datarow, it
works fine as the delete function just sets a delete flag. This means
that I cannot use the function generated by visual studio.net for
deleting a row. The add function doesnt call acceptchanges so the add
function works fine. So there is definitely some inconsistency in the
way the add and remove functions behave.
Am I doing something wrong ? Am I missing something ?
MB
I am using strongly typed datasets in my application. I want to delete
a row. Visual studio.net generated the dataset for me using my xsd
file. It also generated functions to add and remove a row. But the
remove function doesnt work properly. The reason being that it in turn
calls the remove function of the datarow. The remove function in
effect calls the delete function and the acceptchanges function of the
datarow. Now if I call update on the dataadapter, obviously the change
is not reflected in the database as acceptchanges resets my delete
flag. Instead if I use the delete function directly on my datarow, it
works fine as the delete function just sets a delete flag. This means
that I cannot use the function generated by visual studio.net for
deleting a row. The add function doesnt call acceptchanges so the add
function works fine. So there is definitely some inconsistency in the
way the add and remove functions behave.
Am I doing something wrong ? Am I missing something ?
MB