Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL server padding a 10 character field with spaces
Message
 
 
To
20/11/2000 16:46:36
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00443849
Message ID:
00605348
Views:
8
>I created a view which is based on ODBC setting for an SQL server table. IF VFP when I set a 10 character field a value
>of "ABC" in a new record, after I update the SQL table, the field is saved to the SQL server
>table as "ABC" padded to the right with 7 spaces. Is there any way either through a VFP command or ODBC setting
>or possibly an SQL server setting to prevent this from happening ?
>
>Thanks for your help
>Stephen J. Hunt

Hi Stephen,

If field on Sql Server is char(10) than it will be alwys padded to the 10 charcters. If field is varchar(10) than padding will depends on setting of SET ANSI_PADDING at the time when table was created. See SET ANSI_PADDING (T-SQL) in BOL for details.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform