creating accdb file from C#
I want to create Ms access2007 file programatically from c# using Microsoft.ACE.OLEDB开发者_Python百科.12.0
Here is some example:
using System;
using ADOX;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
ADOX.Catalog cat = new ADOX.Catalog();
cat.Create("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;");
Console.WriteLine("Database Created Successfully");
cat = null;
}
}
}
精彩评论