Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incorrigible child view
Message
De
16/01/2015 01:36:48
Walter Meester
HoogkarspelPays-Bas
 
 
À
15/01/2015 14:51:03
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 Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01613696
Message ID:
01613710
Vues:
44
>Hi All,
>
>Is there a limit to the number of fields a view can handle, in this case 40?
>If I increase the size of the table/view to 41 fields, regardless of name or type, and then use SCATTER/GATHER MEMVAR, any action on the view thereafter, such as SKIP, generates a 'SQL: Statement too long' error. Same with SCATTER/GATHER TO/FROM ARRAY. If I use REPLACE v_fieldname WITH m.variable, and run through it that way, it works fine. It just doesn't seem to like GATHER MEMVAR.
>
>Any idea why?
>
>Thanks.
>
>Luke

The cause is that the SQL statement to save the changes into the source table is too long because of a whereclause that is too long.
A Gather will update all fields and therefore create a long SQL statement when saving.
Try the following

DBSETPROP("MyView","VIEW","WHERETYPE", 1)

It will generate a SQL statement matching the record on the key field only.

Walter,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform