Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I set ANSI_PADDING off?

21 views
Skip to first unread message

Kevin Berry

unread,
Oct 8, 2003, 2:54:09 PM10/8/03
to
I'm using Delphi 6 Enterprise with Access 2000, TADOQuery, TClientDataSet,
TDataSetProvider.

My problem is that every string field in dataaware controls is padded at run
time to the length of the Access database field definitions. How do I turn
padding off?

For example, how do I issue a 'SET ANSI_PADDING OFF' command. I tried
setting the commandtext of an ADOCommand object, but just got an invalid SQL
statement error when I executed this--I even tried turning off paramcheck
first.

I also tried making ANSI_PADDING=OFF part of the connection string, but
never got the syntax right if this is the way to do it.

Thanks in advance,

Kevin


Brian Bushay TeamB

unread,
Oct 8, 2003, 11:33:50 PM10/8/03
to

>I'm using Delphi 6 Enterprise with Access 2000, TADOQuery, TClientDataSet,
>TDataSetProvider.
>
>My problem is that every string field in dataaware controls is padded at run
>time to the length of the Access database field definitions. How do I turn
>padding off?

Access does not have an Ansi Padding setting.
I have never seen the problem you describe with Access.
Is your problem just with this one .mdb file or will all your database
applications?

--
Brian Bushay (TeamB)
Bbu...@NMPLS.com

Brian Hollister

unread,
Oct 9, 2003, 9:26:34 AM10/9/03
to
> >My problem is that every string field in dataaware controls is padded at
run
> >time to the length of the Access database field definitions. How do I
turn
> >padding off?


I believe when you use ADO this is the default beavior where i believe i
have heard that the BDE strips off trailing spaces and extra padding, i have
never used the BDE but i am sure i have heard this.


Marjan Venema

unread,
Oct 9, 2003, 9:50:55 AM10/9/03
to
>My problem is that every string field in dataaware controls is padded at run
>time to the length of the Access database field definitions. How do I turn
>padding off?

I'd suspect the drivers (OLEDB or ODBC). Access itself always strips
trailing blanks when storing values and doesn't pad them on when
retrieving values.

Marjan
____________________________
Marjan Venema - BJM Software
http://www.bjmsoftware.com
http://www.bjmsoftware.nl

Kevin Berry

unread,
Oct 9, 2003, 1:39:28 PM10/9/03
to
This happens with any Access2000 database. I have seen newsgroup references
to this problem with Delphi 5, and that an ADO patch fixed this. I have this
problem with Delphi 6, but don't know of any ADO patch for this version.

Kevin


"Brian Bushay TeamB" <BBu...@Nmpls.com> wrote in message
news:pri9ovkq416moj6ao...@4ax.com...

0 new messages