• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Failed to insert a record into MSAcess

 
arun mahajan
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
 
David O'Meara
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
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic