c++查询ACCESS,怎么判断表名已经存在

c++查询ACCESS,如何判断表名已经存在我看到网上大神写的一段代码:StringstrTableName要检测的表名 TSt

c++查询ACCESS,如何判断表名已经存在
我看到网上大神写的一段代码:
String strTableName = "要检测的表名 "; 
TStringList *pList = new TStringList; 
ADOConnection1-> GetTableNames(pList, false); 
if(pList-> IndexOf(strTableName) != -1) 
  ShowMessage( "存在 "); 
else 
  ShowMessage( "不存在 "); 
delete pList;
但是我用之后,报错:pList,ADOConnection1都没定义?怎么回事
ps:我是用_RecordsetPtr m_pRecordset;和_ConnectionPtr m_pConnect;这两个指针来操作数据库的,上面的程序中我把
ADOConnection1换成了m_pConnect,还是不行。

[解决办法]
ADOConnection1要事先定义好并初始化
ADOConnection1 = new TADOConnection;
ADOConnection1->ConnectionString = szConnStr;
ADOConnection1->Connected = true;
然后才能使用