简体   繁体   English

ms winforms应用程序中ms Access的连接字符串

[英]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"; 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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