MDAC 2.5 SDK - OLE DB Providers
OLE DB Provider for SQL Server


 

Removing a Column from an SQL Server Table

SQLOLEDB exposes the ITableDefinition::DropColumn function, allowing consumers to remove a column from a Microsoft® SQL Server™ table.

Consumers specify the table name as a Unicode character string in the pwszName member of the uName union in the pTableID parameter. The eKind member of pTableID must be DBKIND_NAME.

The consumer indicates a column name in the pwszName member of the uName union in the pColumnID parameter. The column name is a Unicode character string. The eKind member of pColumnID must be DBKIND_NAME.

Note   Removing a column is not supported for a consumer connected to a server running SQL Server version 6.5. ITableDefinition::DropColumn returns E_NOTIMPL when the consumer application attempts to remove a column.