Rob:

Sanjesh Pathak suggested earlier (in response to my earlier email) the query:
"select sysdate from dual". I checked with our local database expert who also
concurred that that was probably the best (least expensive?) call to make.. Did
you miss that note? Or maybe you dont agree?

As for why your query failed, I am afraid I am not a database expert by *any*
means, so you want to take the following opinion with the scorn it deserves(!):
Try instead "select 0 from aTable" where "aTable" is the name of a table/view in
your database.

Geeta

Rob Hazlewood wrote:

> Geeta,
> I've been looking at a few different ideas
> i'm using the "select 0" sql command, however when I tried typing that command
> using the oracle odbc test program, it gave me an error. Is this a database
> error, or just a problem with the small program??
>
> is there a noop (no operation) type command?? because if there is that would
> be the best solution. (not that it matters because i'm using alpha servers!)
>
> thanks
> let me know if you find a better way (wouldn't be hard!)
>
> Rob
>
> Geeta Ramani <[EMAIL PROTECTED]> wrote:
> > Rob, we had the same problem and while waiting for a more brilliant
> idea(!!),
> > wrote a function which returned true or false depending on whether the
> connection
> > could execute a simple query like "select user_name from user_tables". Throw
> the
> > execution of the query within a try/catch block, and ..well, I'm sure you
> can
> > fill in the rest.
> >
> > Good luck and if you come up with a better solution please do let me know!
> > Geeya
> >
> > Rob Hazlewood wrote:
> >
> > > java.sql.Connection.isClosed()
> > > doesn't achieve the purpose that i want it for.
> > > isClosed() only checks to see if the client has closed the connection, not
> if
> > > the connection with the server has been lost. What is the best
> alternative??
> > > (so if the connection is lost, a function will return true)
> > >
> > > thanks
> > > Rob
> > >
> > > ____________________________________________________________________
> > > Get free email and a permanent address at http://www.netaddress.com/?N=1
> > >
> > >
> ___________________________________________________________________________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources: http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> > ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to