Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying SQL2000 data type nvarchar...
Message
From
18/10/2001 10:02:59
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
To
18/10/2001 09:23:41
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00570201
Message ID:
00570220
Views:
19
Hi Mitch nvarchar, nchar and ntext are double bytes types that means that each character has 2bytes for example the maximum lenght o a char in sqlserver is 8000 the nchar is 4000. when you are using odbc the cursor returned to vfp is with the lenght of the field in sqlserver this is the reason that the last character is tha funny symbol the only way to resolve this is with ado or create a remote view and change the lenght of the fields that are nchar nvarchar to the double, this can then has another problem since vfp converts to memo the fields greater than 254.

>I am attempting to send a statement to an SQL2000 data source from VFP6.0. The output is going into a cursor where I am receiving some "weird" data. Some of the queried fields have a black, vertical mark replacing the final character. Upon further research, I found that all of these fields have the data type NVARCHAR in SQL2000. I am familiar with VARCHAR and CHAR but not with NVARCHAR or NCHAR. It seems that NVARCHAR is unicode and actually of smaller capacity that VARCHAR. That is the extent of my knowledge but it is happening on all fields with this data type.
>
>I am able to restructure the query using CAST and CONVERT to convert the data type to VARCHAR with successful returns...this is very cumbersome though.
>
>Does anyone know if this is an issue with FoxPro? If anyone has any help to offer it would be greatly appreciated. Thanks.
Alexandre Palma
Senior Application Architect
Previous
Reply
Map
View

Click here to load this message in the networking platform