从光盘执行程序时查询不返回结果
我在 Visual Basic 6.0 中构建了应用程序,并使用 Access 2003 作为数据库。我的问题是,当我将应用程序和数据库刻录到 CD 中,然后从 CD 运行应用程序时,查询仅返回一行。但是当应用程序从计算机的硬盘运行时,它可以正常工作。请帮助我,我遇到了很大的麻烦!
I have build application in visual basic 6.0 and using access 2003 as database. My problem is that when I burn the application and the database in the c.d. and then run the application from the cd, the query return only one row. But when the application is run from the hard disk of the computer, it is working properly. Please help me, I am in a great trouble!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
David W Fenton 先生的评论可以作为该问题的完美答案。实际上,当数据库为只读时,它不会按照我们想要的方式执行查询。因此,请务必取消选中只读标记。
最好将数据库从光盘复制到硬盘的任意驱动器,然后编写程序使数据库正常(即不是只读)。然后执行您的查询,它将返回所有行。
The comment given by Mr. David W Fenton is acceptable as an perfect answer for the question. Actually when the database is read only then it will not execute the query as we want to. So, always uncheck the read only mark.
It will be better to copy the database from the cd to any drive of hard disk and then code the program to make the datbase normal (i.e. not read only). Then execute your query, it will return all the rows.