Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server trailing spaces in RV?
Message
 
 
À
11/02/2003 14:55:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00752013
Message ID:
00752017
Vues:
21
Prior to VFP8, you have to roll your own SQL to trim the values. Another way is to have INSERT/UPDATE triggers in the database to RTRIM() your VARCHAR columns. In VFP8, you have the CursorAdapter that has a ConversionFunc property where you can provide a comma separated list of FieldName function pairs --

LastName RTRIM, FirstName RTRIM, ...

>I was curious if you ever ran into a situation where a VFP 7 Remote view always pads the end of a string with spaces? That is say I have a VARCHAR(30) on SQL Server and pull down a row of data that contains 'Pen' - or 3 characters of
>data. If this data is pushed back (saved) from VFP 7 to SQL Server 2000 it is going in as
>
> 'Pen' + SPACE(27) instead of just 'Pen' - no trailing spaces.
>
>Of course, this defeats the purpose of a VARCHAR. Is there a way to make the VFP remote views work without adding the trailing spaces?
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform