EMSError - "The statement has been terminated. The INSERT statement conflicted with the FOREIGN KEY constraint 'fkHSTCPD_HSTALL'.
The conflict occurred in database 'ds_WMS_dev', table 'dbo.HSTALL', column 'HSTALLID'."
I have 2 TMSStoredProcs that call SPs to insert records into a Parent and Child Table.
1st inserts into Parent table (HSTALL). It also returns the primary key (autoinc) of the table.
2nd inserts into child table (HSTCPD), using the HSTALLID from the 1st as a parameter.
This code works fine outside of a transaction. However, when I use transactions (SqlConnection.StartTransaction), I get the error above.
I am using Delphi 2007 and I updated to 4.70.0.44 this morning.
TMsStoredProc not working with Transactions?
-
cfrazier007
- Posts: 2
- Joined: Tue 20 Jan 2009 15:22