Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I avoid 'SQL: Statement too long (Error 1812)'
Message
From
14/11/2003 12:08:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
14/11/2003 10:43:25
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00849187
Message ID:
00849953
Views:
30
Mike,
I really don't have time to check it in short term. I don't remember how I did it (or honestly if really did it). What I remember was something like :

create a fox2x table with Flagged='yes', KeyField and insert into it all IDs I want to select. Then relate it to layer with AddRelate and SearchExpression( "Flagged='yes'" ). Probably was that, not sure.
Cetin

>Cetin,
>
>I do hope that you are correct. When you find some time, could you please let me know if and how you can make SearchByExpression() use a SQL select statement that includes joins to other tables in MapObjects2.
>
>Regards,
>
>Mike
>
>
>
>>Mike,
>>I don't have time for details now but it can (I think).
>>Cetin
>>
>>>Thanks for the reply Cetin.
>>>
>>>While this idea works for VFP (and SQL Server/Oracle) I'm trying to do this SQL selecting from within the MapObjects2 ActiveX control. If I'm not mistaken, you may know a bit about that control. In particular I'm trying to use the SearchByExpression() method. I don't think it can use joins.
>>>
>>>Mike
>>>
>>>
>>>>
>>>>This ORing might be many and adds to complexity of SQL even if it could ran.
>>>>When I need such things I simply create a cursor and put values there, make an inner join. ie:
>>>>
>>>>create cursor crsTemp (myField i)
>>>>insert into crsTemp values (1234)
>>>>insert into crsTemp values (29929)
>>>>...
>>>>
>>>>select .... from myTable mt ;
>>>>inner join crsTemp lst on val(mt.Myfield) = lst.myField ...
>>>>
>>>>Just my .02 cents
>>>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform