Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP9 updates to VarChar in SQL 2K leaves padded result
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01168557
Message ID:
01168648
Views:
19
Hi Peter,

The solution is simple, change field mapping for varchar fields in the VFP views from char to varchar. Check new SET VARCHARMAPPING setting. If is set to ON before creating a view, than View Designer will automatically map varchar to varchar. Check also CURSORSETPROP("MapVarchar", .T., 0 )

>Regarding:
>
>As a general rule, when I'm moving data between disparate systems I try to make the data types identical or as similar as possible. With the new varchar, varbinary and blob Visual FoxPro types, and the CAST() function in VFP9 we have more and better options to do this than with earlier versions.
>

>I agree with you and tend to do likewise. One reason I've stuck with, and proclaim VFP, is that is just gets better and better like fine wine. I fundamentally could not live without it.
>
>And regarding:
>
>Another thought just came to me - Visual FoxPro Remote Views are based on ODBC, in your case the ODBC Driver for SQL Server. If you continue to have problems, check the version you have. If it's old you could try the current one in the MDAC 2.8 Service Pack 1: http://www.microsoft.com/downloads/details.aspx?FamilyID=78cac895-efc2-4f8e-a9e0-3a1afbd5922e&DisplayLang=en
>

>I do have the latest MDAC. I make a point of keeping things onn teh bleeding edge as far as is realstically possible.
>
>In addition, using either CAST() or PADR() with a column width parameter limit applied would work only in a situation where every data element in a column were to be exactly the same character length: Usually, that is not the case.
>
>So I am really still somwhat mystified in looking for an all encompassing solution albeit this might work in certain pre-defined situations. /psb
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform