简体   繁体   中英

Connection string for ms Access in Ms winforms application

Everything is perfect in this connection string according to my knowledge.But its not working fine.I'll be very thankful if someone helps me out to sort out this issue.Thanks

   string constr = "**Provider=Microsoft.ACE.OLEDB.4.0; Data Source=Data Source=F:/Database1.accdb;Persist Security Info=False**"; 
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(constr);

Your current connection string has multiple issues. Try this instead:

string constr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\Database1.accdb;Persist Security Info=False"; 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM