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!

How to make all tables "read only"?

Status
Not open for further replies.

vecjjk

Programmer
Mar 26, 2002
34
US
We are in the process of replacing our Paradox database with something else. There are no plans to convert the data into the new system, so our users will still need access to the data in Paradox for historical purposes. Management is concerned that if we leave the application "as is", the users will be tempted to continue using it, instead of the new system. Is there an easy way to make all of the tables "read only" so that they can still use the application to view all the data, but cannot change any of it or add to it? Any help would be appreciated. Thanks.
 
vecjjk,

Look at setreadonly method in the objectpal reference files. This gives a simple example of how to set the tables as read only. Personally I would try to import the data into the new system.

Lewy
 
Are your users working directly with the tables or are they working with an Forms Application. If it's a forms application you can fairly easily go into the datamodel and set the tables property to ReadOnly. To do this go to Format -> DataModel and right click on a table and select ReadOnly.
 
I have a simpler solution, let Windows handle the readonly attribute.

From File Explorer right click on the appropriate .db file and select Properties and check the Readonly Attribute.
 
There's an easier and better way. Create directory locks. (If you set the directory to read-only, Paradox won't be able to create the lock files it needs; if you set the files to read only, Paradox may give an error (not sure); but it should recognize directory locks and then only edit functions should return error messages.)

Look in ObjectPAL help for "directories, locking". Once created, you can copy directory locks from dir to dir - you don't have to make them for the dir.

Liz
 
Thanks to all of you for your help. Kilot's solution seemed to work very well for what I need, and was quick and easy. I'm sure that Liz's solution would work too, but there is one table that I need to leave updateable, so I can't lock the entire directory (neglected to mention that in my original post - sorry). Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top