Re: crystal reports varchar = string length 0 in jdbc but
От | Kris Jurka |
---|---|
Тема | Re: crystal reports varchar = string length 0 in jdbc but |
Дата | |
Msg-id | Pine.LNX.4.33.0402122156280.7415-100000@leary.csoft.net обсуждение исходный текст |
Ответ на | crystal reports varchar = string length 0 in jdbc but correct when jdbc-odbc bridge (Klint Gore <kg@kgb.une.edu.au>) |
Ответы |
Re: crystal reports varchar = string length 0 in jdbc but
|
Список | 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 по дате отправления: