开发者

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;

            }
        }
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜