R
Roger Rabbit
Hello,
I have a simple problem that involves an Order and OrderDetail
table.OrderDetail requires an Order Id to be present in Order i.e. ref
integrity prior to record insertion.
Using transactions to ensure that i dont end up with only order stubs and no
detail in case of an error I find that i get an error about a referential
integrity violation because of the above condition.
In other words because i dont call committrans until after i call
..executenonquery on the order detail insertion i get an error becuase the
..executenonquery method requires tha the value be present in Order....which
of course its not yet as i haven;t called .committrans.
It would seem this almost defeats the purpose of transactions?
Thanks
RR
I have a simple problem that involves an Order and OrderDetail
table.OrderDetail requires an Order Id to be present in Order i.e. ref
integrity prior to record insertion.
Using transactions to ensure that i dont end up with only order stubs and no
detail in case of an error I find that i get an error about a referential
integrity violation because of the above condition.
In other words because i dont call committrans until after i call
..executenonquery on the order detail insertion i get an error becuase the
..executenonquery method requires tha the value be present in Order....which
of course its not yet as i haven;t called .committrans.
It would seem this almost defeats the purpose of transactions?
Thanks
RR