That ping query, specifically the "DUAL" part, is strictly for Oracle only
Use an SQL92 standard query. This will work on Oracle, MS-SQL, and newer versions of MySQL as well. Of course if you have hundreds of tables, this query will lose performance. In that case you may need to derive a more efficient simple query. SELECT COUNT(1) FROM INFORMATION_SCHEMA.TABLES But I think the original post will not even get that far. He has lost DB connection, so he definitely will not be able to run a query and an exception will be thrown. I am too new to iBatis, but if there isn't one, there should be a ConnectionState property to determine state of the connection. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors Sent: Wednesday, October 25, 2006 7:25 AM To: [email protected] Subject: Re: Active connection You'll need to use a ping query to make sure that the connection is valid. Something like this: http://www.mail-archive.com/[email protected]/msg026 51.html Larry On 10/25/06, Dorin Manoli <[EMAIL PROTECTED]> wrote: > > > > > Hi ALL! I'm wondering if is there any way to see if a connection is active > or not (didn't found in docs), because I got exceptions when I loose DB > connection and have to reconnect. > > Need a nice way to do that, not catching exceptions.

