Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Tables + Relationships _ Linked Table's - Read Only

Posted by: esskaykay Apr 2 2007, 04:50 PM

Is there a way to link MS Access tables as "read only" in Access2K?
Thanks,
SKK

Posted by: dannyseager Apr 2 2007, 05:45 PM

just make your forms read only...

Posted by: esskaykay Apr 3 2007, 08:04 AM

That probably will work, but is there any way to actually make the tables "read only"?
Thanks,
SKK

Posted by: dannyseager Apr 3 2007, 09:06 AM

Create an ODBC Connection for the database, when selecting the database in the connection setup click Options and then select read only.
When link the tables through the ODBC Connection

Posted by: datAdrenaline Apr 3 2007, 10:00 AM

There are a few ways to do what you want ...
mplement User Level Security
... Or ...
Put the back end in a Read Only network folder
... Or ...
Instead of using "Linked Tables" create a Query with a SQL Statement that has a syntax like this:

CODE
"SELECT * FROM tblTableName IN '' [MS Access;DATABASE=C:\Temp\be.mdb]"
... Or ... if the BE has a db level pwd ...
"SELECT * FROM tblTableName IN '' [MS Access;PWD=ua;DATABASE=C:\Temp\be.mdb]"

(note: "tblTablename" and "C:\Temp\be.mdb" will have to be changed to match you configurations)
Then in the Query properties set the Recordset Type property to "Snapshot". The snapshot setting will render the recordset returned by the query as not-updatable since it takes a "snapshot" of the data to build the recordset. Note, however, the since the data is a SNAPSHOT, you will note see LIVE UPDATES, you will have to requery/refresh the recorset to get the "latest" data.
There may be more ways ... but these three are what came to my mind first.

Posted by: datAdrenaline Apr 3 2007, 10:16 AM

Danny,
tried that, but got an error saying I could not link do it ...
... ?? ...

Posted by: dannyseager Apr 3 2007, 10:49 AM

I've never tried it Brent... I'll have a play with it though...

Posted by: dannyseager Apr 3 2007, 03:07 PM

Brent is correct...
Any of the other methods suggest by myself or brent should work

Posted by: dflak Apr 4 2007, 10:29 AM

I am trying this method. I have two questions:
hould it work in Acess 97? What is the purpose of the blank in single quotes (' ').
When I try this syntax (in MS-Access 97) I get, "The Microsoft Jet Database Engine cannot open the file ' '. It is already opened exclusively by another user or you need permission to view it."
I have the necessary permissions, and the front end to which I am attempting to "link" is the only database open.

Posted by: datAdrenaline Apr 5 2007, 12:13 AM

>> Should it work in Acess 97? <<
Most definately!!
>> What is the purpose of the blank in single quotes (' ').<<
Well ... its NOT a space (aka: blank) surrounded by single quotes ... it two single quotes right next to each other ... a Zero Length String (aka: ZLS).
If there is anything (even a space) in those single quotes, MS Access will try to find a file with a name equivalent to the value between the spaces. However, since I specify the database in the connection string (the value between the square brackets), there is no need to include a value in the quotes.
If your backend DOES NOT have a db level password or ULS, then you can put the db path in between the single quotes, and drop the connection string ...

CODE
"SELECT * FROM tblTableName IN 'C:\Temp\be.mdb'"

Does that all make sense? ...

Posted by: dflak Apr 5 2007, 07:58 AM

I did manage to stumble on the syntax you provided in your last post. However, I do like the idea of having the greater flexibility provided by the original syntax.
Thanks for explaining it to me. I undertand what you are doing now. This is one more item that is going into my Access "book of tricks."
BTW: It does work exactly as advertized in Access97. This technique was precisely what I needed in my application. I find it amazing that you posted the answer the day before I had the question. How do you do that? :-)

Posted by: datAdrenaline Apr 6 2007, 05:32 PM

>> I find it amazing that you posted the answer the day before I had the question. How do you do that? :-) <<
ncient VIP secret .... one must learn it before going to "green" .....
... Actually ... just lucky I guess!
Glad you got it sorted out!!