Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Line is too long
Message
 
 
To
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:
01448473
Views:
30
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform