系统.数据. OleDb. OleDbException [英] System. Data. OleDb. OleDbException

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

问题描述

大家好.
我有一个asp.net网站并上传了文件,但出现了波纹管错误,我不知道如何解决.任何帮助将不胜感激
这是错误:

Hi Guys.
i have a asp.net website and i uploaded but i have got the bellow error , i don''t know how to solve it .any help will be appreciated
here is the error:

System.Data.OleDb.OleDbException: ''c:\windows\system32\inetsrv\App_Data\Dictionary.mdb'' is not a valid path.  Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.<br />
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)<br />
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)<br />
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)<br />
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)<br />
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)<br />
   at System.Data.OleDb.OleDbConnection.Open()<br />
   at AjaxDictionary._Default.GetTrans(String inWord) in C:\wamp\www\a\ppp\Translate.aspx.cs:line 37



将其他信息从下面的答案中移出并添加了文本标签
在本地服务器上可以,但是在服务器上我有这样的错误
我不知道为什么



Moved additional information from answer below and added text tags
it is ok on local server but on server i have such error
i don''t know why

推荐答案


我的建议是在连接到Visual Studio之前,在服务器资源管理器中测试该Db.然后,可以使用服务器资源管理器创建的ConnectionString设置为ConnectionString.

希望对您有帮助,
欢呼声
Hi,
My suggestion is to test that Db in your Server Explorer in the Visual Studio prior to connecting to it. Then, you can use the ConnectionString which Server Explorer creates to set as your ConnectionString.

I hope it helps,
Cheers


当您将应用程序从开发计算机复制到Web计算机时,您忘记了复制Dictionary.mdb.将该文件也复制到服务器上-您可能需要根据服务器上数据库文件的新位置来调整连接字符串.
When you copied your application from your development computer to the web computer, you forgot to copy Dictionary.mdb. Copy that file also to the server - you may need to adjust the connection string depending on the newlocation of the database file on the server.


这篇关于系统.数据. OleDb. OleDbException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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