Board index » delphi » Upgrade from Access 2000 to SQL Server 2000 - table values are padded with spaces

Upgrade from Access 2000 to SQL Server 2000 - table values are padded with spaces

Hi everyone

I'm converting my application from access 2000 to also work on SQL 2000. I upgraded the database using access, altered the ADO connect string in my app, & it worked! There is one problem however, all text fields are now padded with spaces. So I recreated the database with ANSI_PADDING off, and it works beatifully when I'm in the enterprise manager. However, when I want to use it with ADO I still have this problem. The SQL server OLEDB driver obviously thinks that ANSI_PADDING should be on in my session. Do you have a suggestion how to turn this off? ODBC is really no option, this is too difficult for the end-users to maintain.

Regards

Bart

 

Re:Upgrade from Access 2000 to SQL Server 2000 - table values are padded with spaces


Quote
> problem however, all text fields are now padded with spaces.

You need to re-declare all text fields as varchar(n).

--
Vassil Nazarov
http://web.orbitel.bg/vassil/

Re:Upgrade from Access 2000 to SQL Server 2000 - table values are padded with spaces


What a job! I have a lot of them! But it works great. Thanks!

Quote
"Vassil Nazarov" <vas...@mail.orbitel.bg> wrote:
>> problem however, all text fields are now padded with spaces.

>You need to re-declare all text fields as varchar(n).

>--
>Vassil Nazarov
>http://web.orbitel.bg/vassil/

Other Threads