Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL: Statement too long (error 1812) - no apparent reaso
Message
From
30/07/1999 12:08:27
 
 
To
25/07/1999 11:59:13
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00245681
Message ID:
00248235
Views:
18
>>>>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.
>>>
>>>Ed, thanks for the heads-up regarding GATHER NAME. I implemented your code sample, which works fine. However, another problem has come up which is probably the root cause.
>>>
>>>I put a WAIT WINDOW "REPLACEs Complete !" command immediately after the FOR loop, in a custom method of the calling form. When I return from the called form, the FOR loop runs and the WAIT WINDOW shows up. Get this, though - VFP does NOT stop at the WAIT WINDOW - it keeps rolling along right through it. Since I'm using the VFE 5 framework, it effectively does a form refresh. I don't know whether this is some sort of pseudo multi-threaded behaviour or what but it doesn't look kosher.
>>
>>I have no clue - I don't use VFE. A modal event in a modal form should bring things to a halt AFAIK.
>
>I don't think this is an issue with VFE. In a broad sense what I'm doing is:
>
>- calling a custom form method from a command button .Click() on a pageframe
>- in that method, setting up a parameter object and calling a modal form
>- updating the original form view from the parameter object in the custom method
>- issuing WAIT WINDOW right after that, still in the same custom method
>
>- I believe my app should stop at that point, but it does not. It proceeds with the Pageframe.Page.Activate(), which ends up attempting to refresh the whole form.
>
>I don't have any ActiveX components in the form. I do have one object with a ProgrammaticChange() method but I set this back to default for test purposes with no effect.
>
>I'm going to start another thread on this new topic and see if anyone else has run into anything like this.

You may have a stray keystroke or mouse click in your buffer. Try doing a CLEAR TYPEAHEAD and/or DOEVENTS to clear them out before the WAIT WINDOW.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform