Well again a misunderstanding. "... then OLEDB driver and passing byte arrays from .Net " refer to do faulty VFPOLEDB SP1 driver. It was corrected in SP2 (at least documented as corrected, I really didn't test again).
You are right rereading my nessage I see that in my message it sounds like as if I said "Oledb driver have problems with xml and varchar(max)". It should be ODBC that is problematic. With OLEDB I don't have problems.
Cetin
>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