Hi, I am using JDBC 2.0 with datasource and connection pooling. I use Oracle as backend. I am using preparedstatement to fetch some data. There are around 150 rows in the DB but I get the resultset null. when I run the same query in SQL*Plus, its working fine. It's fetching all the rows but taking around 8 mins.(I am connected to the remote DB). but when I connect through my application (JSP -> Java), I get the result set null. What I doubt is if it is the connection timeout or so to the DB? Can I extend this fetching time? or is something else the problem here?
N: you can check the time it will take before your connection will timeout by using the PreparedStatement method: From the API's: getQueryTimeout public int getQueryTimeout() throws SQLException Retrieves the number of seconds the driver will wait for a Statement object to execute. If the limit is exceeded, a SQLException is thrown. Returns: the current query timeout limit in seconds; zero means there is no limit Throws: SQLException - if a database access error occurs See Also: setQueryTimeout(int)