找不到文件'C:\Program Files(x86)\ Common Files \ Micropros Shared\DevServer\10.0\DataBase.accdb'。 [英] Could not find file 'C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\DataBase.accdb'.

查看:178
本文介绍了找不到文件'C:\Program Files(x86)\ Common Files \ Micropros Shared\DevServer\10.0\DataBase.accdb'。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经连接了一个带有访问数据库的网页,当我尝试添加新记录时,我收到此错误:

(找不到文件'C:\Program Files(x86) )\ Common Files\Microsoft Shared\DevServer\10.0\DataBase.accdb'。)



注意:我的数据库已经在App_Data文件夹中。



当我将db文件复制到该路径时,任何插入都将在该路径中,而不是在App_Data中的那个!!



如何修复它只保留原始数据库中的更改?

I`ve connected an web page with access database, when I try to add a new record, I get this error:
(Could not find file 'C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\DataBase.accdb'.)

note: my data base is already in App_Data folder.

and when I copy db file into that path, any inserting will be in that path not in the one in App_Data!!

how to fix it to keep changes only in the original database ?

推荐答案

消息很清楚,你试图使用路径到一个不存在的文件。您的错误很可能是因为您在连接字符串中使用数据库的相对路径( .\DataBase.accdb )。将您的路径更改为数据库的正确位置,然后重试。
The message is quite clear, you are trying to use a path to a file that does not exist. Your error is most likely because you are using a relative path for your database in your connection string (.\DataBase.accdb). Change your path to the correct location of your database and try again.


谢谢,已通过此路径解决字符串:

Thanks, been solved by this path String:
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\DataBase.accdb"


Source=|DataDirectory|\MyDB.mdb"





解决了它:)



Solved it :)


这篇关于找不到文件'C:\Program Files(x86)\ Common Files \ Micropros Shared\DevServer\10.0\DataBase.accdb'。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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