|
virtual bool COSessionEx::CreateIndex(LPOLESTR strTblName, ULONG nIdxInfos, const DBINDEXCOLUMNDESC pIdxInfo[], LPOLESTR strIdxName=NULL, DBPROPSET *pDBPropSet=NULL, DBID **ppIndexID=NULL); Return Value true if successful; otherwise false. Parameters [in] strTblName: A unicode string indicating a table name. [in] nIdxInfos: The count of DBINDEXCOLUMNSDESC structures in pIdxInfo. [in] strIdxName: An array of DBINDEXCOLUMNDESC structures that describe how to construct the index. For details, see the OLEDB documentation of IIndexDefinition::CreateIndex. [in] pDBPropSet: A pointer to a set of index properties. [out] ppIndexID: A pointer to memory in which to return a pointer to the DBID of a newly created index. If ppIndexID is a null pointer, no DBID is returned. Remark Puts an index to a base table. For how to use it, see the example MkTblsEx. |