This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC connectivity - What is wrong with this program?

 
srini arumugam
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I tried to connect JDBC, but no results are getting displayed. Below is the code,


I tried to connect the same user(test\test) through to SQL command line and in EMPLOYEE table results are displayed.



The connection was successful, but still the results are not displayed.
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it print "End" ?
 
srini arumugam
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I got the result. Immediately after creating the table and inserting the records I was trying to access it. Tried to execute the same program after 10 min and got the result.
Don't know may be cache refresh may took time.
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the only thing would be that you forgot to commit your changes after inserting the records (although I do not know if XE supports transactions). Depending on your settings, it is then possible that they are (auto)committed when you leave the program that inserts those records.
 
srini arumugam
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. i forgot to commit.. i tried to access the records with out committing the changes ,it did not work. when i tried the same after committing the changes it worked. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic