Click or drag to resize

InDbc Function

X#
-- todo --
Returns true (.T.) if the specified database object is in the current database; otherwise returns false (.F.).

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION InDbc(
	cDatabaseObjectName,
	cType
) AS LOGIC CLIPPER
Request Example View Source

Parameters

cDatabaseObjectName (Optional)
Type: Usual
Specifies the name of a named connection, field, index, table, or SQL view for which InDbc( ) returns a logical value indicating whether or not the object is in the current database.
cType (Optional)
Type: Usual
Specifies the database object type of cDatabaseObjectName. The table in the remarks section lists the values for cType and the corresponding database object type.
The Connection, Field, Index, Table, and View settings cannot be abbreviated.

Return Value

Type: Logic
Logical
Remarks
A database must be open and current when InDbc( ) is issued; otherwise X# generates an error message.
cTypeDatabase object type
ConnectionNamed connection
FieldField
IndexIndex
TableTable
ViewSQL View
Examples
X#
1Close Databases
2Create Database mydbc  // Creates a new database
3Create Table mytable (field1 C(10)) // Automatically added to database
4? 'MyTable in the database? '
5?? InDbc('mytable', 'Table')  // Returns .T.
6Close Databases
7Delete Database mydbc DeleteTables
See Also