473,323 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Write-only Access to Database on Network Drive?

63
Is it possible to set the file permissions on an Access 2007 database file stored on a Windows file server to allow users to only write data TO an Access database, but not allow them to open the database file or read data from it?

I'm trying to find a mechanism to capture usage data from users who are using a local web application, but I don't want those users to be able to access the data.

The mechanism uses ActiveX objects in Javascript to write data to the database file, but I cannot figure out how to prevent users from reading from the file or opening it.

Or is this kind of thing only possible using a database server, like SQL Server?

Thanks in advance for any help you can provide.
Dec 14 '11 #1

✓ answered by Rabbit

You would create an Access Object and from there you have can do pretty much anything that you can do when you open Access manually.
So instead of new ActiveXObject("ADODB.Connection"), use new ActiveXObject("Access.Application").

10 10106
pod
298 100+
This is what I do, my website is on an IIS webserver on one of my dev computers.
If you are using the same, ...

try settings the security of the network folder where the database resides to allow only a few authorized users (yourself and network administrators perhaps)

then set your webserver's website "Directory Security" tab, "Anonymous access and authentication control" properties to use one of these authorized accounts to access the data.

It might not be the best method or the only one but it works for me.



P:oD
Dec 15 '11 #2
NeoPa
32,556 Expert Mod 16PB
I don't believe Access will work with anything less than full access permissions available (At the file level at least). It may be that one could get around this in the way suggested by POD using IIS security, but I know little of that. If not, then I would at least ensure the project is coded to allow only reading of the data.
Dec 15 '11 #3
Rabbit
12,516 Expert Mod 8TB
You can't prevent them from opening or reading data. But you can encrypt the data you insert into the database. Just make sure to use an mde version of the database so they can't get the key from the code. At least not easily anyways.
Dec 15 '11 #4
postman
63
Rabbit, could you expand on that, please? Do you mean simply encrypting the Access database file with a password?

If so, how do you allow the ActiveX ADO object in the local web application to access the database without supplying the password in the connection string (which is easily viewable)?
Dec 15 '11 #5
Rabbit
12,516 Expert Mod 8TB
I don't mean the built in encryption. I mean implementing your own encryption in code and inserting all data by first running it through that function.
Dec 15 '11 #6
postman
63
I see.
The function for encrypting the data would be in the javascript code in the web application, right? There's no way to have VBA Functions in the database file run unless the file is open, is there?

In your comment below you said to use an MDE (or ACCDE for 2007+) version of the database so the user couldn't get the key. But if the encryption function is in the front-end application, wouldn't a user be able to view the source and determine the key that way?


Never done encryption before, so any suggestions on that would be much appreciated.
Dec 15 '11 #7
Rabbit
12,516 Expert Mod 8TB
No, not in the front-end, because as you say, they can just see the encryption key in the code. It would have to open the database so it can run it through the compiled VBA in the database so the encryption key is at least in an unreadable format.
Dec 15 '11 #8
postman
63
Rabbit, you have been immensely helpful and I don't want to take much more of your time, but could you point me in the right direction of how to open the database to execute the compiled code using javascript?

This is an example of the Javascript code in the front-end I'm using to insert the data into the database now:
Expand|Select|Wrap|Line Numbers
  1. function AddToDB() {
  2. objConn = new ActiveXObject("ADODB.Connection");
  3. conn_String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + dbPath;
  4. sqlStr = "INSERT INTO TableName VALUES (" + var1 + ")";
  5. objConn.Open(conn_String);
  6. objConn.Execute(sqlStr);
  7. objConn.Close();
  8. }
Thanks in advance.
Dec 15 '11 #9
Rabbit
12,516 Expert Mod 8TB
You would create an Access Object and from there you have can do pretty much anything that you can do when you open Access manually.
So instead of new ActiveXObject("ADODB.Connection"), use new ActiveXObject("Access.Application").
Dec 20 '11 #10
postman
63
Thank you, Rabbit! I will try that.
Dec 20 '11 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ellixis | last post by:
Hello, How can I use fwrite() and fseek() in order to write data in the middle (or anywhere else) of a file without overwriting existing data ? People told me that I should load the file into...
7
by: Patrick Useldinger | last post by:
Hi, I think I found a bug in the write method of file objects. It seems as if before writing each block, a check was done in order to verifiy that there is enough space left for the *whole*...
3
by: Gian Mario Tagliaretti | last post by:
Hi all, It is (I hope) a simple question, I cannot figure out why sys.stdout.write() doesn't print immediatly the first text in the small example below, but before it process the code in between...
33
by: Nick Evans | last post by:
Hello there, I have been on and off learning to code (with python being the second language I have worked on after a bit of BASIC). What I really want to know is, if you are going to actually...
9
by: Ricardo | last post by:
Hi. How should I pass a " (doble-quote) character to response.write() in order for it to be sent to the output ? Thanks in advance for the help.
10
by: Greg Hurlman | last post by:
I've got what I'm sure is a very simple problem. In an ASP page, I am trying to write out 4 fields from a recordset in succession: Response.Write rs("LastName") Response.Write rs("Suffix")...
1
by: techy techno | last post by:
Hii Just wanted to know how can I decorate my texboxes and Listmenu which is called from a JS file using the following code below: document.write("<SELECT NAME='cur2' ONCHANGE='cconv1();'>");...
0
by: kuguy | last post by:
Hi all, I'm new to the forums, so I hope this isn't in the wrong place... I have that "Software caused connection abort: socket write error" exception error that i've never meet before. ...
8
by: Mateusz Viste | last post by:
Hi, I am trying make some multimedia files playable from my website. So far, I am able to generate dynamically a new page containing the right <embed> section. However, when I load my script, it...
1
by: celeroSolutions | last post by:
This code works in my site in IE, but not in FireFox, and I'm stuck as to why! Any ideas? (The image paths are correct, I've tested these.) <script language="javascript" type="text/javascript">...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.