本文介绍了Windows 7 64位上的MS Access 32位数据库连接形式VS 2010(x86),错误找不到文件'C:\ Program Files(x86)\ Common Files \ Microsoft Shared \ DevServer \ 10.0 \ dbo.mdb'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试从ASP.NET连接MS Access(*.mdb文件),在我PC上的Windows应用程序中一切正常.相同的代码在ASP.NET中给出错误

在ASP.NET中,Oledb连接是成功的,但是在从datatreader读取数据时,它给出了一个奇怪的错误:(,关于这个问题的任何想法吗?请帮忙,谢谢提前

代码如下

连接字符串为

Hi,

I''m trying to connect MS Access (*.mdb file) from ASP.NET, Everything Works fine in windows application in my PC. the same code giving error in ASP.NET

In ASP.NET Oledb connection is success but while reading from datatreader its giving a strange error :(, Any idea on this issue? Pls help, Thanks In advance

the code is as follows

Connection string is

<add name="oledbCon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\mydatabase.mdb" providerName="System.Data.OleDb"/>



在Windows应用程序中一切正常,ASP.NET中的相同代码从下一行抛出错误



Everything works fine in windows application the same code in ASP.NET throws error from the below line

reader = cmd.ExecuteReader();



错误是



Error is

Could not find file ''C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\dbo.mdb''



在我的连接字符串中,我可以从调试窗口中以D:\ mydatabase.mdb看到我的数据源.


我尝试的步骤如下所示


在VS 2010配置中将AnyCPU从x86更改为x86

请不要:MS Access是32位和Windows 7 64位,并且VS 2010配置更改为x86,当出现此错误时,我在quickwatch中检查了连接状态,并在Open状态下检查了连接状态.



where as in my connection string I can see the my datasource as D:\mydatabase.mdb from debug window


Steps I tried is given below


changed the from AnyCPU to x86 in VS 2010 configuration

Pls not : MS Access is 32 bit and Windows 7 64 bit, and VS 2010 configuration changed to x86, When I''m getting this error I checked the connection state in quickwatch and its in Open state.

推荐答案


这篇关于Windows 7 64位上的MS Access 32位数据库连接形式VS 2010(x86),错误找不到文件'C:\ Program Files(x86)\ Common Files \ Microsoft Shared \ DevServer \ 10.0 \ dbo.mdb'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 00:48