Re: detecting SQL system - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: detecting SQL system
Date
Msg-id 41527DFF.8040905@opencloud.com
Whole thread Raw
In response to detecting SQL system  ("John R Pierce" <pierce@hogranch.com>)
List pgsql-jdbc
John R Pierce wrote:
> One of the Java developers in my group asked me today if there was any
> reliable and portable way he could query JDBC to find out what database
> he was connected to, Postgres vs Oracle vs TimesTen vs ???

connection.getMetaData().getDatabaseProductName()

There are similar methods to get version and driver info.

-O

pgsql-jdbc by date:

Previous
From: "John R Pierce"
Date:
Subject: detecting SQL system
Next
From: "abhishekc"
Date:
Subject: JDBC DRIVER FOR HANDHELDS