>Dear all,
>
>I having a problem when using the xmladaper.applydiffgram() method.
>
>I always get an error #18, Line is too long.
>
>My table has 79 fields (total 1163 bytes).
>
>When I use different table (49 fields, total 755 bytes), I got error #1812, SQL: Statement too long.
>
>Is there a limitation with applydiffgram method?
>
>Thanks in advance,
>David
Hi David,
There is a limit on command length.
XMLAdapter.ApplyDiffgram uses CursorAdapter to do the actual work. CursorAdapter generates SQL statements to update the base table. One part of default setup for CursorAdapter object in XMLAdapter.ApplyDiffgram method is "If the KeyFieldList property is empty, Visual FoxPro adds key fields only if specified (by XMLField.KeyField property). Otherwise, Visual FoxPro adds all fields.".
Can you imagine how long a WHERE clause when 79 fields are listed there?
Try to mark key fields with XMLField.KeyField property. Does it solve the problem?
Thanks,
Aleksey.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only