Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL 2005 varchar(max) and VFP8 Memo fields
Message
From
27/07/2006 19:06:34
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01140879
Message ID:
01140917
Views:
13
Thank you for testing VFP 9.

It seems that SQL 2000 driver doesn't see the length = -1 that SQL Server 2005 sets for varchar(max) in sys.columns metadata, while SQL 2005 driver does but VFP doesn't know what to do with that length.

It's obvious that we must use SQL Native Client, then some tales will be reduced from varchar(max) to varchar(8000) because we read them throug SPT.



Thanks.


>VFP9 get the same results:
>
>lnSQL2000 = SQLSTRINGCONNECT([Driver={SQL Server};Server=Boris;Trusted_Connection=yes;DataBase=Bugs])
>? lnSQL2000
>SQLEXEC(lnSQL2000,[SELECT * from test2],[Test1])
>BROWSE && All is OK varchar(max) is bind to Memo
>
>lnSQL2005 = SQLSTRINGCONNECT([Driver={SQL Native Client};Server=Boris;Trusted_Connection=yes;DataBase=Bugs])
>? lnSQL2005
>SQLEXEC(lnSQL2005,[SELECT * from test2],[Test2])
>BROWSE && No memo field at all only C(0)
>
>I think this is a bug.
>
>
>>Yes, SP1 is current update, but it isn't clear why SQL 2000 driver converts varchar(max) better than SQL Native Client, since this is a new data definition.
>>
>>
>>
>>
>>>>Hello,
>>>>
>>>>I have found an issue in order to convert varchar(max) from SQL 2005 database to Fox memo fields.
>>>>
>>>>Database is created on SQL server 2005, and a given table has varchar(max) fields, but:
>>>>
>>>>When using VFP8 , SQL Server 2000 driver and SQLEXEC , the varchar(max) is well converted to memo field.
>>>>
>>>>When using VFP8 , SQL Server 2005 Native Client driver and SQLEXEC , the varchar(max) is converted to Char(0) . Zero length.
>>>>
>>>>If I open the same table through cursor adpaters, field mapping is OK.
>>>>
>>>>I need to continue to use VFP8 SP1 and SQL 2005 Native Client, What do I need to update or configure?
>>>>
>>>>Thanks,
>>>>Juan C.
>>>
>>>Did you try to upgrade to SQL Server 2005 SP1?
Previous
Reply
Map
View

Click here to load this message in the networking platform