From: sarves <sharvesh@midascomm.com>
To: pgsql-jdbc@postgresql.org
Subject: using postgresql-8.0-311.jdbc2.jar
Date: Wed, 29 Jun 2005 13:09:02 +0530
Message-ID: <42C25016.1090808@midascomm.com> (raw)
Dear sir,
I was interfacing with postgreSQL 7.1.3 from my application
using the JDBC driver released with it. Now,I'm trying to communicate
with postgreSQL 8.0.3 with postgresql-8.0-311.jdbc2.jar. PostgreSQL
8.0.3 server is running on another machine in LAN. My application
connects to the server using postgresql-8.0-311.jdbc2.jar. While it is
possible to connect to the server,the response for each query is empty
data though there's data in server for the given query. The following
method is used to execute each query:
public Vector TableQuery(String instruction) {
SQL = instruction;
Vector queryResult= new Vector(); //Vector de vectores
Vector TableRow = new Vector();
TableHeader = new Vector();
ResultSet rs;
try {
rs = st.executeQuery(instruction);
ResultSetMetaData rsmd = rs.getMetaData();
// Extraer Nombres de Columnas
int cols = rsmd.getColumnCount();
for(int i=1;i<=cols;i++)
TableHeader.addElement(rsmd.getColumnLabel(i));
// Extraer registros
int num = rs.getFetchSize();
if (num>0) {
while (rs.next()) {
TableRow = new Vector();
for (int i=1;i<=cols;i++) {
Object o = rs.getObject(i);
if (rs.wasNull())TableRow.addElement(o);
}
queryResult.addElement(TableRow);
}
wasFail = false;
}
}
catch(Exception ex) {
wasFail = true;
problem = ex.getMessage();
System.out.println("Error: " + ex);
ex.printStackTrace();
}
return queryResult;
}
No exception is thrown. It should be noted that the same snippet works
if I use the JDBC driver given with postgreSQL 7.1.3 to communicate with
postgreSQL 8.0.3.
What could the problem be?
Thanks in advance.
sincerely,
Sarveswaran M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: sharvesh@midascomm.com
Subject: Re: using postgresql-8.0-311.jdbc2.jar
In-Reply-To: <42C25016.1090808@midascomm.com>
References: <42C25016.1090808@midascomm.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox