Hi,

I am trying to read Table and column information from MSAccess using ADO in VC++.

I am able to get the recordset and display it as a string using GetString() method. How do I get individual table/column names. Also how do I ignore the system tables.

My code is as follows: This displays 6 (5 system tables, 1 employee table)
ADODB::_RecordsetPtr myrecord;

CADOConnection *myado = new CADOConnection();
myado->Open("sample","","");
myrecord = myado->m_Con->OpenSchema((ADODB:chemaEnum)20);

myrecord->MoveFirst();
printf("%d\n",myrecord->RecordCount);
printf("%s\n",(LPCSTR)myrecord->GetString((ADODB:tringFormatEnum)2,6,"","",""));

I am not sure if my approach is correct here. Do I have to use ADOX and catalog object?

Any help is highly appreciated.

Thanks,
Preeti