This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JDBC start/stop database needed  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solaris 2.8
Hardware Sun Microsystems
Oracle 8.1.6
Java 1.4
Oracle JDBC class111.zip
I have a Java application that creates a JDBC connection to Oracle database and queries a table called foo, printing out the values. The table has three columns. I the do the following:
1. I close the resultset and statement, etc. and terminate the program.
2. I go into Oracle sqlplus session and drop the table foo and recreate the data (insert).
3. I re-run the Java application and the resulting query is 0 rows; No errors.
4. I stop and start the Oracle listener and retry the java application with not result.
5. I stop the Oracle listener and shutdown the Oracle database.
6. I startup the Oracle database and Oracle listener.
7. I run the Java application again and it gets the new data.
How to prevent restart of database for change in tables?
 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LOL - I just did this same thing the other day! It really messed with my head. In SQL Plus, after the insert, do a commit! It doesn't autocommit for you...
 
James Redpath
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct that was it. I never disconnected from the database which would provide a commit.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanna to see your source code.
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was no source code, this was a general database question. Read the thread!!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!