Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying SQL2000 data type nvarchar...
Message
From
18/10/2001 12:44:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
18/10/2001 09:23:41
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00570201
Message ID:
00570351
Views:
23
>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.

You can convert them back in VFP using StrConv() function. Even in VFP6 it has some functionality to convert from double character set to single and vice versa. In VFP7 this has been expanded to include Unicode, Base64 and few other cases. I'd still recommend converting them server-side, or, if there's no need for Unicode content, to modify the structure of these tables and replace nvarchar (and other n* strings) with single-byte equivalents.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform