dcsimg
A peculiar problem
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vernon_wu
Posted On:   Thursday, December 4, 2003 08:06 AM

Hi, Here is my scenario of using jdbc in the application user registration procedure. A sequence of insertion queries will be submitted for various tables during the course of user registration. To maintain the data integrity, I turn off the auto-commit before the first insertion and set commit to true at the end of the last insertion. All of the rest of tables refer to the first table user ID field. Occasionally, I get the following complain under the condition that no error report from the insertion operation on the table1: java.sql.SQLException: ERROR: $1 referential integrity violation - key referenced from table2 not found in table1 Why I get this inconsistant error? Do I implement the task    More>>


Hi,


Here is my scenario of using jdbc in the application user registration procedure. A sequence of insertion queries will be submitted for various tables during the course of user registration. To maintain the data integrity, I turn off the auto-commit before the first insertion and set commit to true at the end of the last insertion. All of the rest of tables refer to the first table user ID field. Occasionally, I get the following complain under the condition that no error report from the insertion operation on the table1:


java.sql.SQLException: ERROR: $1 referential integrity violation - key referenced from table2 not found in table1


Why I get this inconsistant error? Do I implement the task right? Or any better way to achieve the goal?


Thanks for your input.


Vernon

   <<Less

Re: A peculiar problem

Posted By:   lancieon_wall  
Posted On:   Thursday, December 4, 2003 11:42 PM

Paste your code here.



-Lancieon ;-)

About | Sitemap | Contact