Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapters and VARCHAR(MAX) columns in SQL
Message
From
05/06/2008 06:32:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/06/2008 19:54:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01321461
Message ID:
01321808
Views:
61
>
>Tuhaf. Are you using remote views or SPT? On going back to look at where i had the problem it seems it is with SPT and the SQL Native Client. Perhaps that is the only place there is a problem. I have reproduced in many views using SPT that if the connection is using SQL Native Client the memo fields mapped to VARCHAR(max) come back empty. (vfp 9 sp1, sql 2005) (in VFE a view that uses dynamic view parameters will use SPT after the SQL is parsed, otherwise the remote view is opened directly)
>
>A query of the backend that is not using SPT does not have a problem. ( so opening the view and querying it will return memo data ) But in our parser, where we pull the data with SPT, the memo fields will come back blank.


"I have reproduced in many views using SPT that if the connection is using SQL Native Client the memo fields mapped to VARCHAR(max) come back empty."

That was eactly the problem I have been posting numerous times as a bug since SQL2005 came out:) It happens with var*(max) and xml datatype fields (they come in as 0 length string and it is a VFP bug IMHO - doesn't happen with other consumers like .Net, maybe corrected in SP2?).

I don't use SPT now but CursorAdapter + OLEDB + MapBinary,MapVarchar = .t.

The error seems to be only with SPT/RV which use ODBC (and it IS a VFP bug, other consumers get the data right. You get the data if you cast to say varchar(4000)). With ADO everything is well.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform