|
<< Click to Display Table of Contents >> DbiDeleteTable |
![]() ![]()
|
C syntax
DBIResult DBIFN DbiDeleteTable (hDb, pszTableName, [pszDriverType]);
Delphi syntax
function DbiDeleteTable (hDb: hDBIDb; pszTableName: PChar; pszDriverType: PChar): DBIResult stdcall;
Description
DbiDeleteTable deletes the table given in pszTableName.
Parameters
hDb Type: hDBIDb (Input)
Specifies the database handle.
pszTableName Type: pCHAR (Input)
Pointer to the name of the table to delete. For Paradox, FoxPro, and dBASE, if pszTableName is a fully qualified name of a table, the pszDriverType parameter need not be specified. If the path is not included, the path name is taken from the current directory of the database associated with hDb.
For SQL databases, this parameter can be a fully qualified name that includes the owner name. This function cannot be used to delete SQL views.
pszDriverType Type: pCHAR (Input)
Pointer to the driver type of the table being deleted. Optional. For Paradox, FoxPro, and dBASE tables, this parameter is required if pszTableName has no extension. This parameter is ignored if the database associated with hDb is a SQL database. pszDriverType can be one of the following values: szDBASE, szMSACCESS, or szPARADOX.
Prerequisites
The client application must have permission to lock the table exclusively.
Paradox: If the table is encrypted, the master password must have been registered (using DbiAddPassword).
Completion state
The table and all associated family members are deleted. Deletes all files with <tablename>.*
DbiResult |
Meaning |
DBIERR_NONE |
The table was successfully deleted. |
DBIERR_INVALIDHNDL |
The specified database handle is invalid or NULL. |
DBIERR_NOSUCHFILE |
The table does not exist. |
DBIERR_NOSUCHTABLE |
The table does not exist. |
DBIERR_UNKNOWNTBLTYPE |
The specified driver type is invalid. |
DBIERR_NOTSUFFTABLERIGHTS |
The user has insufficient rights to the table (Paradox only). |
DBIERR_NOTSUFFFAMILYRIGHTS |
The user has insufficient rights to family members (Paradox only). |
DBIERR_LOCKED |
The table is locked by another user. |
See also