Получение индексов Access через OLE DB
уже запарился
CComBSTR bstrConnectionString = "Provider=MSDASQL;DSN=db1;OLE DB Services=-1;User ID=Demian;Password=";
hr = connection.OpenFromInitializationString(bstrConnectionString);
// Open a session.
CSession session;
hr = session.Open(connection);
CStdioFile file;
file.Open("d://testole.txt",CFile::modeCreate|CFile::modeWrite);
CColumns colums;
CTables tables;
CIndexes index;
hr = tables.Open(session,NULL,NULL,NULL,"Table");
// //file.WriteString("====================TABLE==================== \n");
while(tables.MoveNext() == S_OK)
{
hr = index.Open(session,NULL,NULL,NULL,NULL,tables.m_szName);
while(index.MoveNext()==S_OK)
{
cout << index.m_szIndexName << "\n";
}
index.Close();
}
tables.Close();
Не хочет давать индексов(((