Re: getNotifications - Mailing list pgsql-jdbc

From dmp
Subject Re: getNotifications
Date
Msg-id 502E7618.6040008@ttc-cmc.net
Whole thread Raw
In response to Re: getNotifications  (Maciek Sakrejda <m.sakrejda@gmail.com>)
Responses Re: getNotifications  (Maciek Sakrejda <m.sakrejda@gmail.com>)
List pgsql-jdbc
kfan wrote:
> On Fri, Aug 17, 2012 at 9:23 AM, kfan<kfan.b1@gmail.com>  wrote:
>> It's not an exception, it's a compile error.  I am casting the connection
>> object to a PGConnection...interesting to note though that the methods
>> available on the PGConnection object only shows the addDatatype method.

Maciek Sakrejda wrote:
> It would help to see your code and the exception you're getting. My
> guess is you're not casting the Connection object you get back from
> DriverManager to a PGConnection, but that's a shot in the dark at this
> point.

Listener(Connection conn) throws SQLException {
       this.conn = conn;
       this.pgconn = (org.postgresql.PGConnection)conn;

I'm not sure, but I think I'm with Maciek's orginally response. I don't
think you're going to be able to cast a java.sql.Connection to PGConnection
then call one of the latter's methods.

danap.



pgsql-jdbc by date:

Previous
From: Maciek Sakrejda
Date:
Subject: Re: getNotifications
Next
From: Maciek Sakrejda
Date:
Subject: Re: getNotifications