Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View SQL For View During Debugging?
Message
From
02/10/2001 11:12:03
 
 
To
02/10/2001 11:00:25
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00562981
Message ID:
00563042
Views:
16
Hi!

If you meant CREATE SQL VIEW command - I do not think so. When query in the CREATE SQL VIEW command is very similar to what is created by view designer, you will be able to open that view in view designer after changes. However, sometimes view designer can spoil a query or change it by rearranging join conditions or other things. Of course, if you will make such structural changes to query as use of UNION clause, view designer will say you something for sure ;)

BTW, in my applications number of custom-created views in average is 3-4. Indeed there are situations when this is not avoidable. For such case I always have a table that contains all queries for such views (or even for all views), so I can easy re-create them by simple program.

>The Where clause uses just the key fields and is only 88 in length. I guess I'll pull the SQL out to the command window and start playing with it. I'm thinking of removing all the alias portions (LastName instead of vEmployee.LastName). If I get it to work, is there an easy way to incorporate it back into my database. I guess I'll lose the view designer functionality if I go this route...
>
>Renoir
>
>>Hi!
>>
>>Possible cause also:
>>When you have pending changes in the view, requery() does try to update daa automatically. When SQL Where clause is too long, you will receive this message too. Change options in view designer to include only key fields in the SQL Where clause.
>>
>>Havo no other ideas, maybe someone else jump in...
>>
>>HTH.
>>
>>>Hi Vlad,
>>>
>>>Just what I was looking for... The total character count for the expanded SQL was 1,715 so I'm not sure why it is failing.
>>>
>>>Renoir
>>>
>>>>CursorGetProp("SQL")
>>>>
>>>>However, if you have a parameter like "&?lcWhere" and lcWhere contains too long string - here is a problem. SQL Statement in VFP could not be longer than the command line limit (~8000 characters) after expanding of all macros.
>>>>
>>>>There are several ways to make SQL Statement shorter...
>>>>
>>>>>I'm getting an "SQL statement too long" error during Requery of a view. While in debug mode can I view the actual SQL being used to generate the view? I know I can see the original code in the view designer, but what about during execution? Thanks!
>>>>>
>>>>>Regards, Renoir
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform