This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes Out of Sync error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Out of Sync error" Watch "Out of Sync error" New topic
Author

Out of Sync error

Reggie McDougal
Ranch Hand

Joined: Sep 27, 2004
Posts: 69
Hi there wondering if some one can help

I am having probs with the following code

I have a HashMap storing data which I retrieve and want to write to the database, but the code executes OK but does not write to the DB. and debug tells me that the method addRecord is (out of sync)

Can some one give me a hand with this.



You can never drink too much
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Private Parts",
Welcome to the JavaRanch! We're pretty light on rules round these parts, but one rule we take quite seriously is the one on display names. You can read the full version here.

Basically we require your display name to be two words: your first name, a space, then your last name. Obviously fictitious names are not allowed..

Please edit your profile and select a display name which matches the display name rules. PLease do it soon, since accounts with invalid display names get deleted, often without warning.

thanks,
Dave.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Are you sure an exception is not being thrown and you're missing it? Depending on the servlet container you'e using, System.out's may not be retained. That is, they get discarded and not displayed or saved anywhere. Better to look into a logging framework like Log4J.

You're not really handling the exceptions, so it may be better to propagate them ie throw them out of the method. Other than that the code looks fine, but I didn't look too closely.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Out of Sync error