Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find out what tables in a view programmatically
Message
From
17/10/2002 12:11:58
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/10/2002 12:02:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00712321
Message ID:
00712405
Views:
7
>>>Hi
>>>
>>>I have a view that I want to change programmatically and I want to do it once if possible.
>>>
>>>Thanks
>>
>>Title : cursorgetprop('Tables',cViewName)
>>
>>Couldn't understand message.
>>Cetin
>
>Hi Cetin
>
>(example)I have a view:
>create sql view myView as;
>select a.field1, a.field2, b.field3, c.field4;
>from table1 a, table2 b, table3 c;
>....
>
>I want to see if table2 is used in the view WITHOUT opening the view, so I can update the view if table2 does not exist.
>
>Now, if I have to open the view to find out what table are used by using cursorgetprop('Tables',cViewName) then I believe I am getting a bug where the only result I get from using CursorGetprop('Tables',cViewName) is the name of 1 table.
>From my above example I get "table1" only instead of table1 , table2 and table3.
>
>in brief, I have to update a view by adding a table to it and I want to do it only once by checking if this new table already exist.
>In theory cursorgetprop('Tables',cViewName) should solve the rpoblem.
>
>Thanks
>Mo

Then query from dbc :
?DBGETPROP(ViewName,"VIEW","SQL")
?DBGETPROP(ViewName,"VIEW","Tables")
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
Next
Reply
Map
View

Click here to load this message in the networking platform