RESUME

InDBC()

This function tells you whether a specified object is in the current database.

Usage

lItsInThere = INDBC( cObjectName, cObjectType )

Parameter

Value

Meaning

cObjectName

Character

The name of the item to look for in the database.

cObjectType

"Table"

Check for a table called cObjectName in the database.

"Field"

Check for a field called cObjectName in the database. cObjectName must contain the alias and field name.

"Index"

Check for an index called cObjectName in the database. cObjectName must contain the alias and the tag name.

"View"

Check for a view called cObjectName in the database.

"Connection"

Check for a connection called cObjectName in the database.


INDBC() works only for the current database and only if you know the name of the object you're interested in. To find out what tables, views and connections are in the database, use ADBObjects(). For fields, use AFIELDS(). For indexes, use the ATAGINFO() function.

Example

OPEN DATA TasTrade ? INDBC("Customer","Table")              && Returns .T. ? INDBC("Fred","Table")                  && Returns .F. ? INDBC("Customer.Company_name","Field") && Returns .T. ? INDBC("Supplier Listing","View") && Returns .T. ? INDBC("Furshlugginer","Connection")    && Returns .F. ? INDBC("Customer.Company_Na","Index")   && Returns .T. ? INDBC("Company_Na","Index")            && Returns .F.

See Also

ADBObjects(), AFields(), ATagInfo(), Candidate(), DBC(), DBGetProp()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net