Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I detect if a VIEW is present in a database?

Status
Not open for further replies.

rpp

Programmer
Feb 28, 2002
32
0
0
US
Hi Experts,

How do I determine (programatically) if a VIEW is present for within a DBC?

I am trying to create one if it is not found, and if so then I plan to use it.

Thanks in advance.

Richard
 

Hi Richard,

You can use the INDBC function.

E.g.

? INDBC('someview', 'VIEW')

Mark
 

Other than the usefull suggestion markdenby has made, you could also use:
Code:
Open Database myDatabase
=ADBOBJECTS(myViews, "View")

Which gives you an array of all views in the database and do an ASCAN on the array to locate the name of the view you are looking for.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I new there had to be a command similar to that of USED() or FILE() that I could query to see if my view was in the DBC.

At this time the INDBC() will do nicely.

I looked for something like it however I had no idea what it would be called.

Thanks Experts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top