A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
set showplan_all on java
Joined: Aug 18, 2005
Feb 17, 2006 06:45:00
Hi... can u just tell me how to call set showplan_all(sql command) in java.i have to find the time taken to execute the query before executing it.
the command i used is SET SHOWPLAN_ALL ON..i am able to get the time before that.but i dont know how to call these commands in java.i tried with the resultset but it seems to be not working..
i just tried this...
oldrs=state.executeQuery("SET SHOWPLAN_ALL ON");
rs=state.executeQuery("SELECT * FROM DEPT");
newrs=state.executeQuery("SET SHOWPLAN_ALL OFF);
but i am getting the error No Resultset SET was found..
can anyone just help me to get out of this trouble.
Reid M. Pinchback
Joined: Jan 25, 2002
Feb 17, 2006 16:57:00
"set blah" statements aren't queries. Take a look at the Sun Javadoc for statements. executeQuery() isn't your only option. You only use it when the statement is going to return results.
Reid - SCJP2 (April 2002)
It is sorta covered in the
JavaRanch Style Guide
subject: set showplan_all on java
Information regarding Native Code
Few General Questions
asking about classpath
How to compile?
How to set classpath in java?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014