File access is denied

自古美人都是妖i 提交于 2019-12-31 03:03:00

问题


I'm using SQL command within FoxPro 6.0 command window, and encountered the "File access is denied."

My SQL command is:

SELECT * FROM main.dbf WHERE Client = "ABC"

Situation:

  • Windows 7 Pro
  • FoxPro 6.0 main.dbf is shared to many users.
  • main.dbf is not hidden and is not write only

Any comments will be greatly appreciated!


回答1:


Is this DBF file on a shared drive? If so, another user may have the file open Exclusive, or you are trying to open the file Exclusive. By default, Foxpro tries to open tables exclusively.

In the command window or your program, issue these commands:

SET EXCLUSIVE OFF
USE main SHARED
SELECT * FROM main WHERE Client = "ABC"

If you still get the error, then you may want to download a tool that will show you a list of users that have the file open. Perhaps one of them have the DBF opened exclusive.




回答2:


Maybe you need to open the DBF file in exclusive mode:

SET EXCLUSIVE ON

Then perform your SQL query.



来源:https://stackoverflow.com/questions/23283796/file-access-is-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!