المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : split event handler or fire event as two events



C# Programming
11-12-2009, 04:41 PM
hello all...

i have logical trouble in my windows application

there is one eventHandler (Button1_click)
contains
two sqlcommands
the first sqlcommand insert into parent table (primary key table)
the second sqlcommand insert into references table

as expected the code generate sql exception because the referial constraint

the question is : how to solve this problem without adding new eventHandler and without modifying the tables relation?

best regards