Subject | Re: [Firebird-Java] CHAR and VARCHAR |
---|---|
Author | Rodolfo M. Raya |
Post date | 2002-07-29T21:19:51Z |
Hi,
You should expect a string of n chars when retrieving a CHAR(n) field from a database.
Rewrite your SQL queries from
SELECT CHARFIELD FROM ATABLE
to
SELECT CAST( CHARFIELD AS VARCHAR(n) ) AS CHARFIELD FROM ATABLE
HTH
Rodolfo
You should expect a string of n chars when retrieving a CHAR(n) field from a database.
Rewrite your SQL queries from
SELECT CHARFIELD FROM ATABLE
to
SELECT CAST( CHARFIELD AS VARCHAR(n) ) AS CHARFIELD FROM ATABLE
HTH
Rodolfo
On Mon, 2002-07-29 at 18:06, Leos Urban wrote:Hello, I have servlet project which was developed with Interclient (2) JDBC driver. Now I want migrate to Firebird JDBC driver. I have first problem - it looks as if value from CHAR(n) columns add spaces to full column length. Or Interclient trim spaces. Is here any way how to simple say to Firebird driver to trim spaces on CHAR columns??? I used one week old version from CVS, DB is UNICODE_FSS and dialect 3 based. Thanks Leos ------------------------ Yahoo! Groups Sponsor ---------------------~--> Free $5 Love Reading Risk Free! http://us.click.yahoo.com/NsdPZD/PfREAA/Ey.GAA/saFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: Firebird-Java-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
-- MAXPROGRAMS IBM Business Partner Microsoft MSDN Business Connection Partner rmraya@... http://www.maxprograms.com