File access is denied

前端 未结 2 1910
隐瞒了意图╮
隐瞒了意图╮ 2021-01-22 09:35

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 C         


        
相关标签:
2条回答
  • 2021-01-22 10:04

    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.

    0 讨论(0)
  • 2021-01-22 10:22

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

    SET EXCLUSIVE ON
    

    Then perform your SQL query.

    0 讨论(0)
提交回复
热议问题