1.创建数据库 VOID CDB::CreateDatabase() { // ===================== // Create Login Database // ===================== CCeDBDatabase myDB; // Check if Database exists if(!CCeDBDatabase::Exists(_T("Test Database"))) { // Create Database if it doesn't exist already myDB.Create(_T("Test Database")); } } // CreateDatabase 2.打开数据库 CCeDBDatabase myDB; // Open Database myDB.Open(_T("Test Database")); 3.删除数据库 CCeDBDatabase myDB; if (myDB.Open(_T("Test Database"))) myDB.Delete(); 4.关闭数据库 CCeDBDatabase myDB; myDB.Open(_T("Test Database")); myDb.Close();