Hi please if anybody know, this code is not functionable and I don't know why. I want to delete a column from a table and add a new one:
_CatalogPtr m_pCatalog=NULL;
_ColumnPtr m_pColumn=NULL;
_TablePtr m_pTable=NULL;
(_COnnectionPtr m_pDstConCfg is initilaized OK, because data manipulation with _REcordPtr works fine)
m_pCatalog->PutActiveConnection(variant_t((IDispatch *)m_pDstConCfg));
m_pTable=m_pCatalog->Tables->GetItem(_T("My Table");
m_pColumn=m_pTable->Columns->GetItem(_T("Column 1");
Not functionable(throws some unspecified error):
m_pTable->Columns->Delete(_T("Column1");
m_pTable->Columns->Append(_T("aaa",adVarWChar,220);
_CatalogPtr m_pCatalog=NULL;
_ColumnPtr m_pColumn=NULL;
_TablePtr m_pTable=NULL;
(_COnnectionPtr m_pDstConCfg is initilaized OK, because data manipulation with _REcordPtr works fine)
m_pCatalog->PutActiveConnection(variant_t((IDispatch *)m_pDstConCfg));
m_pTable=m_pCatalog->Tables->GetItem(_T("My Table");
m_pColumn=m_pTable->Columns->GetItem(_T("Column 1");
Not functionable(throws some unspecified error):
m_pTable->Columns->Delete(_T("Column1");
m_pTable->Columns->Append(_T("aaa",adVarWChar,220);