Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trailing blanks/SET ANSI_PADDING OFF
Message
From
22/08/2002 13:34:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00692418
Message ID:
00692560
Views:
22
>Hi,
>
>just wanted to verify, if SET ANSI_PADDING OFF when creating SQL-Server tables is the only solution for getting rid of trailing blanks in MS SQL Server varchar() fields, when updating via ODBC from VFP.
>
>Is there really no connection level setting (MSSQL SET command) which could be used? What do people do, if they have to use an existing database where tables were created with SET ANSI_PADDING ON, which is the setting MS recommends?
>
>Thanks,
>Armin

Armin,
If varchar field gets trimmed value then it doesn't store trailing spaces whether padding is on or off. Also if you use memo as datatype on VFP side varchar fields wouldn't get extra spaces (provided there aren't intentional trailers).
PADDING OFF is SQL server's default AFAIK.
When I have to use it I either use memo datatype or I accept them as fixed length fields similar to VFP and trim(),pad() on VFP side or rtrim(), convert() on SQL server side.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform