This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

5 INSERT but only 4 in my access table

 
Younes Essouabni
Ranch Hand
Posts: 479
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx for your help!!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic