This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I have created two tables in my database each one is dependent with each other. Now i need to insert the values into the tables simultaneously. For this condition how to make use of the executeBatch() method of prepared statement.
Supriya, Forgetting about JDBC for a moment, wouldn't this be a problem? If you insert into either one, there would be a constraint error. While you could drop the constraints, add the records and re-create the constraints, this is quite inefficient.
Can you give an example of why you need circular dependencies between two tables?
I have more than a table with empid as primary key and it is auto increment. i have two more tables. those also have empid so i made them as foreign key as these table are dependent .
my problem is when i try to submit my page fields belong to different tables but for that particular emp id only i have to insert those values . when i am using triggers i am getting foreign key constrait violated trigger.