UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Linked Table's - Read Only    
 
   
EssKayKay
post Apr 2 2007, 04:50 PM
Post#1



Posts: 509
Joined: 5-April 03
From: NE Wisconsin


Is there a way to link MS Access tables as "read only" in Access2K?
Thanks,
SKK
Go to the top of the page
 
dannyseager
post Apr 2 2007, 05:45 PM
Post#2


UtterAccess VIP
Posts: 13,031
Joined: 2-March 04
From: Leicester, UK


just make your forms read only...
Go to the top of the page
 
EssKayKay
post Apr 3 2007, 08:04 AM
Post#3



Posts: 509
Joined: 5-April 03
From: NE Wisconsin


That probably will work, but is there any way to actually make the tables "read only"?
Thanks,
SKK
Go to the top of the page
 
dannyseager
post Apr 3 2007, 09:06 AM
Post#4


UtterAccess VIP
Posts: 13,031
Joined: 2-March 04
From: Leicester, UK


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
Go to the top of the page
 
datAdrenaline
post Apr 3 2007, 10:00 AM
Post#5


UtterAccess Editor
Posts: 17,941
Joined: 4-December 03
From: Northern Virginia, USA


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.
Go to the top of the page
 
datAdrenaline
post Apr 3 2007, 10:16 AM
Post#6


UtterAccess Editor
Posts: 17,941
Joined: 4-December 03
From: Northern Virginia, USA


Danny,
tried that, but got an error saying I could not link do it ...
... ?? ...
Go to the top of the page
 
dannyseager
post Apr 3 2007, 10:49 AM
Post#7


UtterAccess VIP
Posts: 13,031
Joined: 2-March 04
From: Leicester, UK


I've never tried it Brent... I'll have a play with it though...
Go to the top of the page
 
dannyseager
post Apr 3 2007, 03:07 PM
Post#8


UtterAccess VIP
Posts: 13,031
Joined: 2-March 04
From: Leicester, UK


Brent is correct...
Any of the other methods suggest by myself or brent should work
Go to the top of the page
 
dflak
post Apr 4 2007, 10:29 AM
Post#9


Utter Access VIP
Posts: 6,017
Joined: 22-June 04
From: North Carolina


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.
Go to the top of the page
 
datAdrenaline
post Apr 5 2007, 12:13 AM
Post#10


UtterAccess Editor
Posts: 17,941
Joined: 4-December 03
From: Northern Virginia, USA


>> 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? ...
Go to the top of the page
 
dflak
post Apr 5 2007, 07:58 AM
Post#11


Utter Access VIP
Posts: 6,017
Joined: 22-June 04
From: North Carolina


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? :-)
Go to the top of the page
 
datAdrenaline
post Apr 6 2007, 05:32 PM
Post#12


UtterAccess Editor
Posts: 17,941
Joined: 4-December 03
From: Northern Virginia, USA


>> 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!!
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th December 2017 - 04:15 PM