• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Write to DB immediately before cnn.close()

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using the jdbcodbc bridge with an Access DB. My main connection class is a static class, which is used by all other classes for db interaction. It all works fine, but when I perform a DB INSERT/UPDATE, the results do NOT get written to the DB until I explicitly call conn.close() In my case, this may not happen for a long time, until the program exits, but till then the other classes are not aware of the newly inserted data.
Any ideas would be highly appreciated.
Thanks in advance,
Anoop
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen funny problems with the jdbc:odbc and access before. If you want the insert to take effect right away, sometimes you have to do an extra select to the table AFTER the insert. It seems to give a whack in the processor to commit the insert. IF you have autoCommit set to false you will have to call con.commit() to commit the changes.
Jamie
[Editted by Dave to fix the jdbc-odbc thing]
[This message has been edited by David O'Meara (edited November 18, 2001).]
 
Nair Anoop
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I shall give it a try.
~ Anoop
 
reply
    Bookmark Topic Watch Topic
  • New Topic