ITableDefinition::DropColumn

This method drops a column from the base table.

HRESULT DropColumn(
   DBID*   pTableID,
   DBID*   pColumnID);

Parameters

pTableID

[in]
A pointer to the DBID of the table from which to drop the column.

pColumnID

[in]
A pointer to the DBID of the column to drop.

Return Code

S_OK
The method succeeded and the column was dropped from the base table.

E_FAIL
A provider-specific error occurred.

E_INVALIDARG
pTableID or pColumnID was a null pointer.

DB_E_BADCOLUMNID
The column specified in *pColumnID does not exist in the specified table.

DB_E_BADTABLEID
*pTableID was an invalid table ID.

DB_E_NOTABLE
The specified table does not exist in the current data source.

DB_E_TABLEINUSE
The specified table was in use.

DB_SEC_E_PERMISSIONDENIED
The consumer did not have sufficient permission to drop the column.

DB_E_BADTABLEID
*pTableID was an invalid table ID.

Comments

If DropColumn returns any errors, the column is not dropped.

See Also

ITableDefinition::AddColumn