Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to create a view of a shared free table?

Status
Not open for further replies.

Puebles

Programmer
Feb 3, 2016
14
US
I am trying to create a view of a shared free table and keep getting this error:

"File access is denied "FILELOCATION\FILENAME

Is it not working because the file is shared and currently opened?

If so, can I create the view when I can open the table exclusively and then use the view and the table shared?
 
Yes, it's perfectly possible to create a view on a shared table, and on a free table.

Keep in mind that you need a database (a DBC) to be open in order to create a view. But the database, like the table, can be open exclusively or shared.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike has you,

but to make it simple: Don't store views in a central DBC, use a local one, for every user. Take a section of your application init code to keep a local view DBC up to date. Since you make that a local DBC, there is no problem opening that exclusive and/or getting short exclusive access for writing the view into it.

And after the view is defined, it acts like any query on DBFs. A view is not much more than query code (besides the query it just includes some info needed especially for updatable views), thus the view itself is code, not data, the data still comes from the queried DBFs or remote database tables and you only need file permissions as necessary by your EXCLUSIVE setting and folder/file permissions.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top