Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Line is too long
Message
 
 
À
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:
01448473
Vues:
31
>>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.

You can also use stored procedure (especially if you're talking about SQL Server) and just pass all fields new values
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform