Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Unanswered: db2connect issue

    While executing a SELECT statement using DB2Connect, the query returns untrimmed values.
    for example:
    While executing a query like "select name from mytable where mytable.id=10;",

    if name is defined as char(20) and the value is "vivek" then DB2connect returns
    "vivek+15 spaces".

    But this is not the case with NEON and it returns "vivek". (as far as we know)

    So we have to trim all the values that are fetched and used in our application.
    Almost all queries in our application are of type select *, so trimming at each query proved to be futile.

    Is there any parameter in the DB2CONNECT driver(something like PATCH1) which can be
    set to get rid of this extra spaces?

    Thanks
    swosty

  2. #2
    Join Date
    Apr 2003
    Posts
    191

    Re: db2connect issue

    Hi,

    what is NEON?

    DB2 Connect Gateway is a server proxy, and should return records in the same fashion the server does.

    Trimming white space is a client issue. That's why I asked what NEON is. I would try looking at the DB2 client configuration first. There is a PATCH1 keyword in the CLI guide and reference of version 7.

    Johann

    Originally posted by swostypatnaik
    While executing a SELECT statement using DB2Connect, the query returns untrimmed values.
    for example:
    While executing a query like "select name from mytable where mytable.id=10;",

    if name is defined as char(20) and the value is "vivek" then DB2connect returns
    "vivek+15 spaces".

    But this is not the case with NEON and it returns "vivek". (as far as we know)

    So we have to trim all the values that are fetched and used in our application.
    Almost all queries in our application are of type select *, so trimming at each query proved to be futile.

    Is there any parameter in the DB2CONNECT driver(something like PATCH1) which can be
    set to get rid of this extra spaces?

    Thanks
    swosty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •