Subject Re: [Firebird-Java] CHAR and VARCHAR
Author Rodolfo M. Raya
On Tue, 2002-07-30 at 10:47, Leos Urban wrote:
>You should expect a string of n chars when retrieving a CHAR(n) field from
a database.

Ok. But then there is incompatibility with Interclient based applications...
I don't know what your application does, but there is a difference between CHAR(n) and VARCHAR(n) and the Type 4 driver returns the right string.
>Rewrite your SQL queries
>SELECT CAST( CHARFIELD AS VARCHAR(n) ) AS CHARFIELD  FROM ATABLE

Does not help me - the same effect.
Only trim() is solution (or changing DB to VARCHAR).

Maybe this is feature (that CHAR returns full length), but when I have
CHAR(2) then I get string with 6 character. It looks as a bug with Unicode?
Because I doesnt have time I prefer change DB structure to VARCHAR.

I am in bad situation, because with my new installed Redhat 7.3 server and
new Firebird server does not work Interclient -some Exception about wrong
protocol version. I tested both interclient.jar from ibphoenix with same
effect.
I installed FirebirdCS-1.0.0.796-0 and Interclient_201_linux-xinetd.tar.gz  in Red Hat 7.3 without recompiling anything. Everything works as expected. Check your configuration again.
It means - I need go to new JDBC :-))

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