OLEDB connection to Access Database (accdb)

后端 未结 4 2153
有刺的猬
有刺的猬 2020-12-06 01:36

I want to make a simple application for an exercise, so it could be nice to connect to a simple database like Access (.accdb)

My program looks like this:

<         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 02:17

    add using System.Data.OleDb library.

    now for the connection string

    OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Aishwar NIGAM\\Documents\\indianOil.accdb");
    

提交回复
热议问题