Access绝对地址

Posted on 2010-11-22 14:17  孤∮帆  阅读(131)  评论(0编辑  收藏  举报

           string path = System.Windows.Forms.Application.StartupPath + "\\DB.mdb";
            string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + path + ";";
            OleDbConnection conn = new OleDbConnection(strConn);
            conn.Open();

Copyright © 2024 孤∮帆
Powered by .NET 9.0 on Kubernetes