Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapters and VARCHAR(MAX) columns in SQL
Message
From
03/06/2008 20:55:45
 
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:
01321474
Views:
41
There is something about the SQL Native Client that make VARCHAR(max) fields useless with VFP - at least with remote views that is the case. The SQL ODBC works as expected. Perhaps this is related to the issue you've got here, if you are using SQL NativeClient for your conneciton.

>I ran across an issue today creating a cursor adapter. I wanted to map a datetime in SQL to a date in VFP, so I checked the box in the builder to "Use CursorSchema when filling cursor" and clicked the "Build" button to get the default schema. I changed my T column type to a D and then moved on to the Auto-Update tab of the Builder where I got the following error dialog
>
>---------------------------
>CursorAdapter Builder
>---------------------------
>An error occurred in this builder. The details are:
>
>
>
>Error #: 1713
>
>Message: Field width or number of decimal places is invalid.
>
>Line #: 0
>
>Method: OMEMBER.getfieldslistfromschema
>
>
>
>Would you like to close the builder?
>---------------------------
>Yes No
>---------------------------
>
>Turns out that one of the columns is a VARCHAR(MAX) - something new in SQL Server and VFP doesn't like it much. The "Use memo when character field length greater than __" setting doesn't help.
>
>I manually changed the C(255) the builder put in for me to M and life was good again.


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