This was actually your reply where I thought we agreed that SQL Native Client was a problem for VFP.
>>
>>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.
>>
>
>I documented it on forums for a few times at least:) I noticed the dicrepencies first with XML datatype, then OLEDB driver and passing byte arrays from .Net (now in list of corrected bugs of SP2-but I don't use SP2) then varchar(max). Bug seems to be within VFP not the driver itself. Try with a nonVFP environment and it correctly returns the data.
>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.