Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

JDBC connectivity - What is wrong with this program?

 
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.
 
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • 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: 2658
19
Netbeans IDE C++ Linux
  • 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.
 
Those are the largest trousers in the world! Especially when next to this ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic