Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Varchar(MAX), Memo fields, SPT and Remote Views
Message
From
24/01/2008 11:13:58
 
 
To
24/01/2008 10:58:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01284904
Message ID:
01285063
Views:
63
>>Yes casting works and also if you use ADO instead of ODBC you don't need any casting.

If I use ODBC ( the one that isn't sql native client ) when I create the ODBC connection, everything works without casting. But SQL Native Client seems to either have a bug or an 'undocumented feature' <s>

So this is known behavior of SPT and varchar(max) and SQL Native Client?

Is it documented or mentioned anywhere? Sure made me crazy trying to figure out why some my views worked and some didn't in retrieving memo data.



>>Does anyone know how to get varchar(max) fields to return data into a memo field using SPT and the SQL Native Client?
>>
>>Our framework has two ways of implementing remote views. If we just open the remote view as it is written a M field mapped to VARCHAR(MAX) returns data as expected. If we use SPT on the same view select ( we build it on the fly to implement dynamic view parameters from DBCX ), the memo fields are empty as if fetchmemo were false ( it isn't )
>>
>>This is using SQL Native Client for the driver.
>>
>>In the same scenario if the connection uses the ODBC driver, the memo data comes in with either method as it should.
>>
>>I guess I should not be surprised that in the wonderful world of Microsoft only the older driver works properly with the newer data type <g> but I thought there may be some trick in SPT using SQL Native Client to get this to work properly.
>>
>>FWIW casting the varchar(max) in the remote view works with SQL Native Client
>>
>>cast(testbed.mnotes as varchar(1000)) as mnotes
>>
>>
>>
>>TIA
>
>Charles,
>Yes casting works and also if you use ADO instead of ODBC you don't need any casting.
>Cetin


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform