How to connect to a MS Access file (mdb) using C#?

前端 未结 6 814
迷失自我
迷失自我 2020-11-27 21:24

I\'m trying to connect to a mdb file and I understand that I would need Microsoft.OLEDB.JET.4.0 data provider. Unfortunately, I do not have it installed on the

6条回答
  •  没有蜡笔的小新
    2020-11-27 21:40

    Try this..

    using System.Data.OleDb;
    
    OleDbConnection dbConn;
    
    dConn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Registration.accdb;");
    

提交回复
热议问题