问题描述
我正在使用VS2005开发Windows移动应用程序。我添加了一个SQL Mobile数据库,创建了一个包含数据的表。然后我将它绑定到数据网格。但是,每当我使用模拟器运行时,都会出现"无法找到数据库文件"的错误。检查
数据库的路径。 [文件名= \Program Files\test\test.sdf]"
I am using VS2005 to develop windows mobile app. I added an SQL Mobile Database, created a table with data in it. Then I bind it to a datagrid. However whenever I use the emulator to run, it will give an error of "The database file cannot be found. Check the path to the database. [ File name = \Program Files\test\test.sdf ]"
我做错了什么?
推荐答案
为了正确理解您的问题,我有2个问题:
I have 2 questions in order to understand your problem right:
1 - 您是否检查过文件\Program Files \\\\test.sdf实际上是否存在于您的模拟器上?
1 - Did you check that the file \Program Files\test\test.sdf is actually present on your emulator ?
2 - 它是否适用于真实设备?
2 - Does it work on a real device ?
这篇关于如何让数据库工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!