How to create a new OleDB database (.mdb) C # ???

    1 answer 1

    You can try DAO or ADOX. Add a link to Microsoft ADO Extensions for DDL and Security to the project. For example:

    using System; using ADOX; namespace Test { class Creation { [STAThread] static void Main(string[] args) { ADOX.CatalogClass cat = new ADOX.CatalogClass(); cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=C:\database.mdb;" + "Jet OLEDB:Engine Type=5"); Console.WriteLine("База данных создана успешно"); cat = null; } } }