Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / December 2003

Tip: Looking for answers? Try searching our database.

JDBC crawl problem : what can it be?

Thread view: 
Bura Tino - 03 Dec 2003 17:16 GMT
Hi,

Generally, the problem is this. I run the same query twice. The first
time it takes 1 sec, the second time it takes 10min!

Details:

I'm using servlets, the query is run over the JDBC-ODBC bridge. The
actual database is contained in an excel spreadsheet.

For test purposes, the query is encapsulated in a single method - and
the method is called twice. It opens the database, runs the query and
closes the database. In other words, the following commands are given
twice:

     connect = DriverManager.getConnection("jdbc:odbc:MyData");
     Statement statement = connect.createStatement();
     ResultSet result = statement.executeQuery("select * from Data
order by ID, Date");

     connect.close();

Can anyone suggest what it can be?

Many thanks in advance,

Bura
kevinc - 03 Dec 2003 18:05 GMT
Always close your result set.
I have seen many problems related to open ResultSet instances

> Hi,
>
[quoted text clipped - 23 lines]
>
> Bura


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.