Re: crystal reports varchar = string length 0 in jdbc but - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: crystal reports varchar = string length 0 in jdbc but
Date
Msg-id Pine.LNX.4.33.0402122156280.7415-100000@leary.csoft.net
Whole thread Raw
In response to crystal reports varchar = string length 0 in jdbc but correct when jdbc-odbc bridge  (Klint Gore <kg@kgb.une.edu.au>)
Responses Re: crystal reports varchar = string length 0 in jdbc but  (Klint Gore <kg@kgb.une.edu.au>)
List pgsql-jdbc

On Fri, 13 Feb 2004, Klint Gore wrote:

> I've just started with crystal reports 10 and java based connections.
> My problem is that when I use the postgres jdbc driver, my varchar's all
> come out as string fields of length 0.  If I use the sun jdbc-odbc
> bridge, then they come out the correct length.  int4, int2, timestamp,
> date all come out correct on either driver.
>
> Anyone got any suggestions?  Using java to walk the table writing values
> can read the values ok (code below).  Has anyone got a class to show the
> metadata for a table?

See DatabaseMetaData.getColumns

>
> Using the JDBC driver, the javabean looks like this (the things in []
> have been changed from their values) which appears to be correct as it
> works for non string types.  I switch between the 2 connection methods
> by commenting out the appropriate forName and getConnection.

All the code you've showed us does is create a connection, open a result
set and print it.  You also note that this code works.  The
interesting code would be: the table definitions, the sql query, and
the actual printing code used.  Depending on how crystal reports works
these may not be easy things to get to, but you'll have to give us
something more to work with.

Kris Jurka



pgsql-jdbc by date:

Previous
From: Klint Gore
Date:
Subject: crystal reports varchar = string length 0 in jdbc but correct when jdbc-odbc bridge
Next
From: Klint Gore
Date:
Subject: Re: crystal reports varchar = string length 0 in jdbc but