databasegridfoxprovisual-foxprofile-in-use

Getting "file in use" error after populating a grid with data from a table after the table has been used in another form


i am a beginner in learning VFP and i am facing a problem.

I have two forms:

The problem is i can not populate the grid with data from the table "users", because i keep reciving the error "File in use". i set the RecordSource for data to table, sql statement and alias and still nothing. i have tried replacing the grid with list and combobox, but i still receive the error.

Please help ! :) Thank you


Solution

  • In your application, there is a "SET EXCLUSIVE" setting, so if anyone else has the file open, it will prevent you from getting at it. So somewhere in the beginning of your app.

    SET EXCLUSIVE OFF

    This will allow the table to be opened multiple times and by multiple users in network environments. Additionally, if you would like, I have offered many in the past of mentoring / guidance in VFP development where it can be more detailed that snippets such as this forum.