• 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

values not been inserted

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator




this code dodent produce any errors , but also no values are been inserted into the database . i tried it with a select * quesry and the rows are been selected. only there are not been inserted . whats wrong.








[added code tags]
[ September 07, 2005: Message edited by: Jeanne Boyarsky ]
 
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

Could you post the actual code you have compiled and tested? The code you have here has syntax errors.

If you use the CODE button at the bottom and paste your code between the tags, all of the indentation will be kept - which helps in debugging.

Ta.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
rule number 1: stop using Access and the jdbc-odbc bridge. It sounds harsh, but you wouldn't have this problem otherwise.

The temporary solution: do a dummy select after the insert (ie select anything), commit the connection or set the connection to autocommit(true)

Or stop using the jdbc-odbc bridge.
 
Ranch Hand
Posts: 293
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd also recommend using PreparedStatements if you can instead of Statements.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dave Salter:
I'd also recommend using PreparedStatements if you can instead of Statements.



Always true (at least in my view), although the pointers I gave will work around a known JDBC-ODBC issue where statements get cached in the Driver and require an extra operation to flush them.
 
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you suggest which driver should be used when using MS-Access.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recommend the Oracle and MySQL Drivers. They won't work with Access, but they will work with Oracle and MySQL. You can search for other Access drivers here.
 
Dave Salter
Ranch Hand
Posts: 293
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats a good resource. Thanks for that David.
 
reply
    Bookmark Topic Watch Topic
  • New Topic