using System; using ADOX; namespace GameControl { public partial class ConsoleApplication { ADOX.CatalogClass m_Adox = new CatalogClass(); // 初始化CatalogClass对象 m_Adox.Create("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Application.StartupPath + "\test.mdb"); m_Adox = null; GC.Collect(); // 强制回收资源并解除LDB锁定 Console.WriteLine("数据库创建成功"); } }