From: | Pucky Loucks <ploucks(at)h2st(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Java Studio Creator Fix/Hack |
Date: | 2004-12-10 22:09:26 |
Message-ID: | 27935D81-4AF8-11D9-BF6C-000D9344294E@h2st.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi everyone, I noticed at TODO for getMetaData() on the 8.0 and figured
I'd give this task a try. I now am able to use Java Studio Creator
with Postgresql 7.4.6.
couldn't access the postgresql sites for the past couple of days so I
posted my hack on the Sun Software Forums.
http://swforum.sun.com/jive/thread.jspa?threadID=50150&tstart=15
here is was I posted:
Ok so I've noticed that there have been a few of us Postgres people
trying to use JSC with our favourite Database. I am posting the fix
here because i can't get access to the Postgresql websites(very odd).
if you check out the postgres jdbc code from their cvs change
org.postgresql.jdbc2.AbstractJdbc2Statement.getMetaData() to the
following.
===========START OF CODE HACK===============
public ResultSetMetaData getMetaData() throws SQLException
{ ResultSet rs = null;
checkClosed();
rs = getResultSet();
if(rs == null)
{
// the following code hack has not been fully tested, therefor use at
your own risk.
/// by Pucky Loucks of How2share Technologies (creators of PiXPO)
StatementResultHandler handler = new StatementResultHandler();
connection.getQueryExecutor().execute(preparedQuery,
preparedParameters,
handler,
0,
0,
QueryExecutor.QUERY_ONESHOT);
rs = handler.getResults().getResultSet();
}
return rs.getMetaData();
}
===================END OF CODE HACK=====
then run ant for pgjdbc and use the postgresql.jar that is in the jar
directory, and volia.
Enjoy.
Pucky Loucks
Senior Systems Architect
How2Share Technologies Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-12-11 00:45:35 | Re: Java Studio Creator Fix/Hack |
Previous Message | Chris White (cjwhite) | 2004-12-10 19:52:00 | Issue with large objects |