This content has been marked as final.
Show 4 replies
-
-
2. Re: CHAR and Blanks
cyberdoc Jun 2, 2004 4:21 AM (in response to cyberdoc)A workaround?? Or do i need to know every field size?
Michael -
3. Re: CHAR and Blanks
jkarges Jun 24, 2004 3:45 AM (in response to cyberdoc)I'am facing with the same problem.
In my case: I'm connecting to a DB2 database. Some primary keys are VARCHARs. But in indices, DB2 always stores the max. string size specified in VARCHAR(n). The bevaiour exactly like your problem. The data out of the index comes like for CHAR columns: With spaces.
As a workaround, I am wondering, if it is possible to trim all columns of type CHAR/VARCHAR in the result set, bevor the data is stored in the entity bean. Actually: No idea. -
4. Re: CHAR and Blanks
fbiaggi Jun 24, 2004 2:15 PM (in response to cyberdoc)Hi,
this is DB dependent,
for example on DB2/400 work fine.
May be a good idea to avoid CHAR and use VARCHAR instead.
Ciao.