MS Access数据库连接问题 [英] MS Access database connection problem

查看:89
本文介绍了MS Access数据库连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



今天我正在尝试连接ms-access数据库,



但不幸的是我无法连接到数据库,



我的连接字符串使用web.config,比如



Hi Guys,

Today i'm trying to connect ms-access database,

but unfortunately i'm unable to connect to the database,

my connection string using web.config, like

<add name="AccessConn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source='D:\17092013\MASubhan\DCSME.accdb; Persist Security Info=False"/>



*此连接字符串是否正确..



i收到错误:未经验证的格式



plz建议我。





谢谢&最好的问候,

MOHAMMED



SHOUTING删除 - OriginalGriff [/ edit]


* is this connection string is correct or not..

i'm getting error called: UNRECOGNIZED FORMAT

plz suggest me.


Thanks & Best Regards,
MOHAMMED

[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

看看这个链接,会有很多连接字符串示例可用,请尝试根据您的MS Access运行时间修改连接字符串(2007/2010/2013等)



MS Access连接字符串 [ ^ ]
Have a look at around this link, there will be plenty of connection string example available please try to modified you connection string based on your MS Access run time (2007/2010/2013 etc)

MS Access Connection string[^]


以2003格式保存您的访问数据库文件









如果您的Access数据库是2007格式的话将您的提供者更改为Microsoft.Jet.OLEDB.12.0
save your access database file in 2003 format after that your code will wor

or


if your Access database is in 2007 format then change your provider to Microsoft.Jet.OLEDB.12.0


您可以在此类项目中设置



sConnString =Provider = Microsoft.ACE.OLEDB.12.0; Data Source =&Application.StartupPath&\trial.a ccdb; Persist Security Info = False;
you can set in project like this

sConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\trial.accdb;Persist Security Info=False;"


这篇关于MS Access数据库连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆