🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database.bdp
Article #4

Re: BDP eating trailing spaces

#4
From: news.borland.com
Date: Tue, 19 Dec 2006 17:11
31 lines
2447 bytes
"Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> wrote in message 
news:4587fdf9$1@newsgroups.borland.com...
> news.borland.com wrote:
>> Ive found a problem where my app is getting VARCHAR2 fields with their
>> trailing space trimmed. A packet trace shows that the data is getting
>> to my client box properly, so the trim happens somewhere in BDP code.
>>
>> How can I get the exact text, I dont want it trimmed.
>
> Then use CHAR fields, not VARCHAR. The definition of VARCHAR is that data 
> *should* be returned with any trailing blanks trimmed.
>
.Net v1.1, Oracle 8 & 9i

Well it is apparently not Oracle's definition by default. I see that it is 
for SQL Server and that they have an ANSI_PADDING option. Regardless, this 
is the server's responsibility. Why is BDP enforcing this in client side 
code? And why only unidirectionally? i.e. only on SELECT not on UPDATE.

I cannot alter the tables to use CHAR, project manager won't allow it. This 
is a show stopper for me. As I mentioned in another post I am using WHERE 
clauses for concurrency/synchonization. Its just not going to work if I 
can't GET what is actually on the DB.?! I wonder if theres any chance of 
getting this fixed?

I could do trimming locally on all strings before any UPDATE, and then fix 
all the existing data, and hope trailing spaces never find their way in. or 
maybe load my WHERE clause up with trim() statements to trim server side 
values... but I dont like it.. better to start porting to ODP or MS data 
providers I think. 
Technical Details
Message-ID: <45881d02@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4586daf5$1@newsgroups.borland.com> <4587fdf9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effeb,55aa26900fbb2200
X-Google-Attributes: gid1effeb,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "news.borland.com" <someone@microsoft.com>
Newsgroups: borland.public.delphi.database.bdp
References: <4586daf5$1@newsgroups.borland.com> <4587fdf9$1@newsgroups.borland.com>
Subject: Re: BDP eating trailing spaces
Date: Tue, 19 Dec 2006 10:11:26 -0700
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 159.87.116.4
Message-ID: <45881d02@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1166548226 159.87.116.4 (19 Dec 2006 09:10:26 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail