If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2connect issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-25-03, 06:09
swostypatnaik swostypatnaik is offline
Registered User
 
Join Date: Dec 2003
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 12-29-03, 06:21
jsander jsander is offline
Registered User
 
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

Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On