This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc java insert program

 
dedeepya pilla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,
im doing one jdbc program in java for insertion into msacces database,code is running fine but the values are not reflecting in the database.
but im able to retrive the table data for same kind of program nd table.


output it is showing as:1rows updated

thanks in advnace
Dedeepya
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please CarefullyChooseOneForum, this topic is more suitable for JDBC forum. Also I have added code tags this time; for future reference please read UseCodeTags (<- click); with proper indentation and code tags your code is easier and more pleasant for us to read, so you will most likely get your answer faster.

Welcome to the Ranch!
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There could be several reasons. Perhaps you're looking into a different database from the one you're inserting into from Java (double check the ODBC definition). You might also be missing a commit, though that doesn't look likely if this is the whole of your problematic code, since JDBC is in autocommit mode by default. (Missing commit is a source of confusion in a lot of cases, though, so I'm mentioning it here nevertheless.)
 
dedeepya pilla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes thanks it working now
i forgot to close the connection
now it is working
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic