C#连接Access2013
Jun 07, 2016 pm 03:43 PM今天测试 连接 Access2013数据库,遇到错误,综合几个大神建议,解决了 我的系统是windows 2008 64位的, 连接 字符串如下: 1 connectionStrings 2 add name= " TestConn " connectionString= " Provider=Microsoft.ACE.OLEDB.12.0;Data Source= 3 E:\data\
今天测试连接Access2013数据库,遇到错误,综合几个大神建议,解决了
我的系统是windows 2008 64位的,连接字符串如下:
<span>1</span> <connectionstrings> <span>2</span> <add name="<span">"<span>TestConn</span><span>"</span> connectionString=<span>"</span><span>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=</span> <span>3</span> E:\data\Test.accdb;Persist Security Info=<span>false</span><span>"</span><span>/></span> <span>4</span> </add></connectionstrings>
注意:这里的Provider不是Microsoft.Jet.OLEDB.12.0,将Jet改为ACE
但是当我运行时走到打开连接这一步时出错了,提示如下:
然后在CSDN上搜了一下,发现是项目属性问题,因为我的系统是64位的,需要将生成中的“首选32位”勾选掉才行
然后再运行,正确,取得数据!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What do you think of furmark? - How is furmark considered qualified?

What does printer error code 0x0000011b mean?

Shared printer cannot connect to printer

How to solve limited network connection in Windows 10

How to connect OnePlus watch to Bluetooth headset_How to connect OnePlus watch to Bluetooth headset

Join a new Xianxia adventure! 'Zhu Xian 2' 'Wuwei Test' pre-download is now available

Why is there no sound after my phone is connected to a Bluetooth headset?
