Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Line is too long
Message
De
09/02/2010 18:20:34
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
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 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01448316
Message ID:
01448469
Vues:
47
>The VFP UPDATE-SQL command has no special limit besides general limit of 255 fields per table. Who knows what kind of update statement VFP generates for a view.

CursorAdapter knows, if you use it, and write some code in BeforeInsert or BeforeUpdate - the update statement is one of the parameters. I had that error when the length of the statement was about 8K. I managed to get around the limitation by shortening the alias of the cursor, because the statement looks like

insert into targetalias (field1, field2, field3, ... fieldN) values (?sourcealias.field1, ?sourcealias.field2, ?sourcealias.field3, ...?sourcealias.fieldN)

The statement for update is equally verbose - doesn't check for changed values, IIRC it lists them all. With long field names and a long alias, at about 200 fields it can grow over 8k (in compiled code, which seems to be the limit - but this is just field names, which don't get compiled any shorter than they are).

So... this seems to be the limitation. One way would be to break this into two shorter (insert plus update, or two updates) statements, or as many as needed.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform