Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Line is too long
Message
From
09/02/2010 18:20:34
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01448316
Message ID:
01448469
Views:
45
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform