I have the following datatables which are related:
Transaction
TransactionId-Sequence
Orders
OrderDetails
when I process a
daTransaction.update(dtTransaction)
daTransactionIdSequence.update(dtTransactionIdSequ ence)
daOrders.update(dtOrders)
daOrderDetails.update(dtOrderDetails)
each table is linked with foreign key relationships in the .xsd file and I
can easily get parentrow information. When I populate the datatables and
run the update, each one works by executing an insert and popluates the next
datatable with the new transaction id which sql generated from an identity
field and returnd it via @@identity to the drTransaction datatable. But
when I try to update drOrderDetails last, it thinks it is doing an update
and not an insert and fails because it is not in the database yet.
Any clues as to what is happening here? The insert statement is simple and
to the point in the dataadapter and so is the update statement. It is just
using the wrong statement.
Thanks,
Scott Emick
Sofware Engineer
Fox International
--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam