• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Failed to insert a record into MSAcess

 
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am trying with the following code to insert a record into the MS Access database...It prints me on system that it has inserted a record but it never did same...Am I doing something wrong or there is some other problem?
I am using following:
1. Windows 2000
2. MS Access 2000
3. JDK 1.3.0 ( also tried with 1.4.0)
To Connect with database
*************************

To insert a record(tried using Preapared and Simple Statement:
*******************

regards,
Arun
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you ran a search in the JDBC forum, you'd find that this is a common problem with the JDBC-ODBC bridge.
Solution: either make sure you close the connection, set autocommit(true) before hand, or do a dummy read (ie a search that you don't care about the results of) after the insert or update.
Dave
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the inserted row reflects in the MS Access database only when u close the connection.
Sim Sim.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...which is what I said.
 
sim sim
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OOPS...I did not notice...Sorry boss
 
    Bookmark Topic Watch Topic
  • New Topic