Article View: borland.public.delphi.database.bdp
Article #6Re: BDP eating trailing spaces
From: Wayne Niddery [TeamB]
Date: Wed, 20 Dec 2006 15:40
Date: Wed, 20 Dec 2006 15:40
51 lines
3801 bytes
3801 bytes
news.borland.com wrote: > > 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 do agree that if the server stores trailing blanks you enter then you should also be able to select them back. After checking a bit more I realize I need to modify my statement about the difference a little as well. The difference is that, with char, the database will *pad* anything you enter to the defined length - i.e. will add trailing blanks. With varchar it won't, however you can still include trailing blanks yourself, they're just treated as any other character. Caveat is that each product may still have slightly different rules about this, but this is the most common AFAIK. > 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've looked in QC and don't see anything specific about this, but please do enter something there in this area: http://qc.codegear.com/wc/qcmain.aspx?da=4572 Are the fields always being padded to the defined field length, or could there be *some* trailing blanks but still with a total string length less than the max defined field length? If always padded fully, then the application could pad out what it gets after the select. In the latter case though there doesn't appear to be any good work around. Perhaps others here using Oracle might be able to suggest something. > 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. Personally, I do tend to trim such fields, or if I fail to do so, am happy to get them back trimmed, so for me, I'm curious as to why the trailing blanks are are actually important (not a criticism, I just can't imagine a situation where I would ever actually want trailing blanks, so I'm curious). Oh, and could you change your posting name from "news.borland.com" to something else? Thanks. -- Wayne Niddery - Winwright, Inc (www.winwright.ca) "A man is likely to mind his own business when it is worth minding, when it is not, he takes his mind off his own meaningless affairs by minding other people's business." - Eric Hoffer
Technical Details
Message-ID:
<4589592f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4586daf5$1@newsgroups.borland.com> <4587fdf9$1@newsgroups.borland.com> <45881d02@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 Reply-To: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> From: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> Newsgroups: borland.public.delphi.database.bdp References: <4586daf5$1@newsgroups.borland.com> <4587fdf9$1@newsgroups.borland.com> <45881d02@newsgroups.borland.com> Subject: Re: BDP eating trailing spaces Date: Wed, 20 Dec 2006 10:40:32 -0500 Lines: 53 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: 69.17.150.141 Message-ID: <4589592f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1166629167 69.17.150.141 (20 Dec 2006 07:39:27 -0800) X-Authenticated-User: wniddery Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail