Jeff S
asked on
SQL 2005 - Insert Into (Foreign Key Issue).
I think I have a Foreign Key issue and need some help on my insert.
Error Message recvd in application:
IDispatch error #3119
Number=547 State=23000 Source=Microsoft SQL Native Client
Description=The INSERT statement conflicted with the FOREIGN KEY constraint "FK_SC_ClearinghouseId". The conflict occurred in database "DemoCPS", table "dbo.Clearinghouse", column 'ClearinghouseId'.
Number=3621 State=01000 Source=Microsoft SQL Native Client
Description=The statement has been terminated.
Number=0 State=01000 Source=Microsoft SQL Native Client
Description=Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Error Message recvd in application:
IDispatch error #3119
Number=547 State=23000 Source=Microsoft SQL Native Client
Description=The INSERT statement conflicted with the FOREIGN KEY constraint "FK_SC_ClearinghouseId". The conflict occurred in database "DemoCPS", table "dbo.Clearinghouse", column 'ClearinghouseId'.
Number=3621 State=01000 Source=Microsoft SQL Native Client
Description=The statement has been terminated.
Number=0 State=01000 Source=Microsoft SQL Native Client
Description=Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
INSERT INTO dbo.Settings
( ClearinghouseId ,
InsuranceCarrierCompanyId ,
InsuranceCarrierCompanyProcessingId ,
ECSInsuranceCarriersId ,
PlugInId ,
Type ,
Name ,
Value ,
Created ,
CreatedBy ,
LastModified ,
LastModifiedBy
)
VALUES ( 18 , -- ClearinghouseId - int
NULL , -- InsuranceCarrierCompanyId - int
NULL , -- InsuranceCarrierCompanyProcessingId - int
NULL , -- ECSInsuranceCarriersId - int
NULL , -- PlugInId - int
'ClearinghouseTransmission' , -- Type - varchar(50)
'AccountNumber' , -- Name - varchar(50)
'13562' , -- Value - varchar(255)
'2009-06-30 20:36:02' , -- Created - datetime
'Jeff' , -- CreatedBy - varchar(30)
'2009-06-30 20:36:02' , -- LastModified - datetime
'Jeff' -- LastModifiedBy - varchar(30)
)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, 18 exists. See attached screen shot.
6-30-2009-4-43-19-PM.pdf
6-30-2009-4-43-19-PM.pdf
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Split points to be fair.
ASKER