Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

5 INSERT but only 4 in my access table

 
Younes Essouabni
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a simple ex from the JAVA TUTORIAL
But with my access Database I have only four rows inserted and I should have 5.
In fact it's always the last that is missing.
Any Idea??,
Here is the code!

I must have missed something!
Can anyone help me?
[ February 28, 2002: Message edited by: Younes Essouabni ]
 
Younes Essouabni
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I add another executeUpdate
like this:
stmt.executeUpdate("UPDATE COFFEES SET TOTAL=1000 WHERE COF_NAME LIKE 'Colombian'");
I will have my 5 elements but not the update of TOTAL?
Any suggestions?
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a common Problem with jdbc ODBC bridge when connecting to Access. For all inserts to take effect, do a dummy select on the table you inserted into after you've completed your inserts. For some reason this gives the database a smack in the face and causes the last entry to be committed.

Jamie
[ February 28, 2002: Message edited by: Jamie Robertson ]
 
Younes Essouabni
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx for your help!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic