Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapters and VARCHAR(MAX) columns in SQL
Message
From
04/06/2008 19:54:47
 
 
To
04/06/2008 16:57:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
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:
01321771
Views:
51
>>>Yes, I had this error regarding GUID casting to C(36). It seems to sometimes go wrong, especially with NO cursorschema.
>>>
>>>With varchar(max) I had the phenomenon it resulted in Char(0) fields (don't confuse with CHR(0)) if the first resultset record was an empty varchar(max). Varchar(max) works fine with the ODBC driver (Driver="SQL Server"), Ii get a memo field there in the resultcursor scheme, independant on the first resultset value in that field.
>>>
>>>So it seems with the SQL Native Client driver the automapping of varchar(max) fieldd to the vfp result cursor is working like vfp itself when determining the cursorstructure of resultsets with it's native sql on dbfs: Taking the scheme of the first result record. So maybe the bug regarding varchar(max) is by design. But the chr(0) issue in the conversion of uniqueid to c(36) could also be an error of SQL Native Client.
>>>
>>>Driver versions:
>>>SQL Native Client: 2005.90.3042.00
>>>SQL Server: 2000.85.1132.00
>>>
>>>All in all I second that for now the SQL Server driver is the safer option.
>>>
>>>Bye, Olaf.
>>
>>Yes, we definitely found that we were not seeing memo field data when using remote views against varchar(max) fields when we used the sql native client.
>>
>>Now always use SQL Server Driver in VFP apps.
>
>Charles,
>I'm using Native Client driver along with varchar(max), varbinary(max), guid and I don't have problems (maybe because that I use OLEDB).
>Cetin

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.


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