Data retrieval from DB2 fetches extra spacesUrgent

Hi ,

I am trying to retrieve data from DB2. When i try doing the same using the JDBC adapter in webMethods 6.01, I get extra spaces for all the char/Varchar fields.

For example, say in the DB2 table I have a field Name Varchar(10).If it contains a value say ‘RAM’ when i try fetching the value I get 7 spaces after RAM.

Request to help me with solutions if anyone has had similar problems.

Thanks in Advance,


Yemi Bedu

DB2 on the AS400 stores strings as left or right padded fields based on data dictionary. Basically it translates to CHAR on regular SQL databases. Its not varchar.

You would need to use trim() in wM to get the spaces out.
You can use trim(), right inside the adapter service itself, so you ned not trim every field in your flow service.