找不到数据库文件.检查数据库路径 [英] The database file cannot be found. Check the path to the database

查看:142
本文介绍了找不到数据库文件.检查数据库路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,..
我收到以下错误,
实际错误是

错误:找不到数据库文件.检查数据库的路径. [数据源= \ Program Files \ database \ sample3.sdf]

我使用VS 2008 sp1,SQL Server 2008和Windows Mobile 6.0来开发Windows Mobile应用程序.我遇到了上述错误.它在(View-> ServerExplorer-> Add Connection)中正常工作,但是我断开了连接方法.错误,所以我将我的应用程序(数据库)和db(sample3.sdf)复制到了(C:\ Program Files)中.我遇到了错误.请为我的问题提供正确的解决方案. h2_lin>解决方案

检查数据库是否存在,并且确实已将其放置在正确的位置. (您实际上不应该将数据文件保留在"Program Files"文件夹下,而应考虑"My Documents").

在Visual Studio中,打开服务器资源管理器"窗格(View..Server Explorer)
如果列出了数据库,则突出显示它的位置将在参数"窗格的连接字符串"参数中.

如果未列出,请右键单击数据连接",然后单击添加新连接"并浏览到它.您可以在该对话框中检查它是否可以正常工作.


Hi Friends,..
I got The following Error,
The Actual Error is

Error:The database file cannot be found. Check the path to the database. [ Data Source = \Program Files\database\sample3.sdf ]

I used VS 2008 sp1, SQL Server 2008 and Windows Mobile 6.0 for developing Windows Mobile Application.I got the Above Error.It is correctly Working in(View->ServerExplorer->Add Connection) but I did disconnected approach.i got the error and so i copied my application(database)and db(sample3.sdf)into the (C:\Program Files)i got the error..Please give me the correct solution for my problem..Thx

解决方案

Check the database exists, and that you have indeed pot it in the right place. (You should not really keep datafiles under the "Program Files" folder - consider "My Documents" instead).

In Visual studio, open the Server Explorer pane (View..Server Explorer)
If your database is listed, then it''s location will be in the "Connection string" parameter in the Parameters pane if you highlight it.

If it isn''t listed, right click Data Connections, then click Add New Connection and browse to it. You can check it is there and working from this dialog.


这篇关于找不到数据库文件.检查数据库路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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