Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error #18 & #1812 when using xmladapter.applydiffgram()
Message
From
02/07/2003 14:57:33
 
 
To
02/07/2003 01:27:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00805960
Message ID:
00806254
Views:
28
This message has been marked as the solution to the initial question of the thread.
>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
Map
View

Click here to load this message in the networking platform