A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum regarding insert data
Joined: Sep 14, 2007
Sep 14, 2007 05:37:00
: [Microsoft][SQLServer 2000 Driver for
][SQLServer]The INSERT statement conflicted with the FOREIGN KEY constraint "FK_EmpDetails_Emp". The conflict occurred in database "itracker", table "dbo.Emp", column 'EmpId'.
how can i handle this exception
Joined: Apr 14, 2004
Sep 14, 2007 05:54:00
Make sure the data you insert doesn't conflict with your database constraints. My guess is you are inserting a record into the emp table that uses an empId that does not exist in empdetails?
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: forum regarding insert data
JDBC / SqlServer / MSDriver / executeBatch / no exception thrown
Exception while trying to add a new user to the database
Insert Query with auto-incrementing key
ResultSet is not updateable.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013