//创建数据库
#include <afxole.h>
#include <dbdao.h>CdbDBEngine      dben;
CdbWorkspace      wrkDefault;
CdbDatabase      dbsNew;wrkDefault = dben.Workspaces(0L);
/* Create a new encrypted database with the specified 
  (dbLangGeneral) collating order.
*/
dbsNew = wrkDefault.CreateDatabase(_T("NewDB.mdb"),
                                dbLangGeneral, dbEncrypt);
...
dbsNew.Close(); //或者
CDaoDatabase m_pDB
  try
{
    m_pDB.Create("路径");
}
catch(CDaoException *p)
{
    DisplayDaoException(p);
    p->Delete();
    return;
}