Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL: Statement too long (error 1812) - no apparent reaso
Message
From
24/07/1999 07:46:33
 
 
To
24/07/1999 02:29:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00245681
Message ID:
00245700
Views:
13
>I'm using VFP5.0a (build 415). I've got a view-based form that creates a parameter object using SCATTER...NAME and passes it to another (modal) form (which uses a private datasession).
>
>On returning from the modal form, I'd ideally like to issue GATHER...NAME to update the view form's fields with updated values from the parameter object. However, if I try, I get the above error.
>

How many fields and tables are involved? Updating a view from a GATHER NAME actually creates a SQL Update, and you may be hitting your head against the wall there.

To verify that this is in fact the problem, you could try creating a temporary cursor that matched the view on a field for field basis; if you can GATHER NAME into that, but not into your view, that's what's happening. As far as a workaround, you could try spinning through the list of fields one by one in a FOR loop and doing REPLACEs; something like:
SELECT MyComplexView
FOR i = 1 TO FCOUNT()
   REPLACE (FIELD(i)) WITH EVAL('oMyScatterObject.' + FIELD(i))
ENDFOR
>If I try to REPLACE just a few view fields from the parameter object, it works. If I try a REPLACE of all, or slightly more than half, same error.
>
>When the modal form is closed, the .Activate of the view form is eventually called, which refreshes the view form. The error handler is reporting the problem in a piece of code that works perfectly in every other circumstance and which contains no SELECT - SQL statements even approaching the limit.
>
>The view-based form is fairly complex. Has VFP been known to throw bad/misleading error messages when the going gets tough?
>
>Any help or wild-assed guesses greatly appreciated.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform