rt

解决方案 »

  1.   

    可以搜索它的系统表(例如ms sql的sysobjects)
    或者 select * from tablename 获取错误信息
      

  2.   

    可以搜索它的系统表(例如ms sql的sysobjects)
    或者 select * from tablename 获取错误信息------------统一
      

  3.   

    BOOL bExist = TRUE;
    CDaoTableDefInfo tableInformation; // only needed for the call
    TRY
    {
        pModelData->GetTableDefInfo(strTableName, tableInformation);
    }
    CATCH (CDaoException, e)
    {
        if (e->m_pErrorInfo->m_lErrorCode == 3265)
          bExist = FALSE; //表不存在
    }
    AND_CATCH (CMemoryException, e)
    {
    }
    END_CATCH
      

  4.   

    try
    {
    m_recordSet = m_connection->OpenSchema (adSchemaTables,vtMissing,vtMissing);
    while ( !m_recordSet->EOF )
    {
    tablesNames = m_recordSet->Fields->Item[L"TABLE_NAME"]->Value;
    kooky = (char*) tablesNames;
    if (kooky.Left(4) != "MSys")
    m_tablesList.AddString( kooky );
    m_recordSet->MoveNext();

    }
    }
    catch(...) {}
      

  5.   

    我的数据库是access 2000的,据说DAO驱动不支持,还有没有其他方法
      

  6.   

    VC6.0与ACCESS2000 
    BOOL CYourApp::InitInstance() 

       AfxEnableControlContainer(); 
       AfxGetModuleState()->m_dwVersion = 0x0601; //增加此行 
       ..... 

      

  7.   

    http://expert.csdn.net/Expert/topic/1138/1138945.xml?temp=.6502497