File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes JDBC connectivity - What is wrong with this program? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JDBC connectivity - What is wrong with this program?" Watch "JDBC connectivity - What is wrong with this program?" New topic
Author

JDBC connectivity - What is wrong with this program?

srini arumugam
Greenhorn

Joined: Nov 02, 2009
Posts: 14
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

Joined: Dec 20, 2006
Posts: 2503
    
    8

Does it print "End" ?


OCUP UML fundamental and ITIL foundation
youtube channel
srini arumugam
Greenhorn

Joined: Nov 02, 2009
Posts: 14
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

Joined: Dec 20, 2006
Posts: 2503
    
    8

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

Joined: Nov 02, 2009
Posts: 14
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC connectivity - What is wrong with this program?