Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapters and VARCHAR(MAX) columns in SQL
Message
De
04/06/2008 10:35:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01321461
Message ID:
01321602
Vues:
33
>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.

I don't have problems using Varchar(max) with cursoradapter but I don't use the builder + I set MapBinary and MapVarChar to .t.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform