Skip site navigation (1) Skip section navigation (2)

using postgresql-8.0-311.jdbc2.jar

From: sarves <sharvesh(at)midascomm(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: using postgresql-8.0-311.jdbc2.jar
Date: 2005-06-29 07:39:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
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++)
          // Extraer registros
          int num = rs.getFetchSize();

          if (num>0) {

              while ( {

                     TableRow = new Vector();

                     for  (int i=1;i<=cols;i++) {

                          Object o = rs.getObject(i);

                          if (rs.wasNull())TableRow.addElement(o);

               wasFail = false;
    catch(Exception ex) {
          wasFail = true;
          problem = ex.getMessage();
          System.out.println("Error: " + ex);

    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.

Sarveswaran M


pgsql-jdbc by date

Next:From: Roland WalterDate: 2005-06-29 08:05:02
Subject: Re: using postgresql-8.0-311.jdbc2.jar
Previous:From: Oliver JowettDate: 2005-06-28 22:29:12
Subject: Re: prepared statement incompatibility

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group