£
£ukasz Margielewski
I have a dataset and a couple of tabels in it geberated automatically by
dataset designer tool.
I have to attend RowUpdate event by define and place standard lines of
code (from Microsoft sites) in appropriare places. I need to do this because
I want to receive an autonumber primary key column value ...
This standard procedure consists of 3 steps:
1) declare: public event oledbrowupdatedeventhandler rowupdated
2) define:
protected static void OnRowUpdated(object sender, OleDbRowUpdatedEventArgs
args)
and :
3) gRUPATableAdapter.RowUpdated += new
OleDbRowUpdatedEventHandler(OnRowUpdated);
And after that application works fine, everything looks good (program
properly adds rows and receives autonumbes). And ... when I continue my
HARD! work with application and rebuild project, the manually inserted code
disappears ( the event declaration is cleaned up) and ... compiler errors
apperar. What I'm doing wrong - where I have to insert code (by hand or by
designer).
Similarly problem occurs when I manually override addTABLERow function
generated by designer ... Why IDE has still deleting my code!
dataset designer tool.
I have to attend RowUpdate event by define and place standard lines of
code (from Microsoft sites) in appropriare places. I need to do this because
I want to receive an autonumber primary key column value ...
This standard procedure consists of 3 steps:
1) declare: public event oledbrowupdatedeventhandler rowupdated
2) define:
protected static void OnRowUpdated(object sender, OleDbRowUpdatedEventArgs
args)
and :
3) gRUPATableAdapter.RowUpdated += new
OleDbRowUpdatedEventHandler(OnRowUpdated);
And after that application works fine, everything looks good (program
properly adds rows and receives autonumbes). And ... when I continue my
HARD! work with application and rebuild project, the manually inserted code
disappears ( the event declaration is cleaned up) and ... compiler errors
apperar. What I'm doing wrong - where I have to insert code (by hand or by
designer).
Similarly problem occurs when I manually override addTABLERow function
generated by designer ... Why IDE has still deleting my code!