I have an WinForms application that uses a JET database. The app and the db are both installed on a user's workstation at my client's office and it works just splendidly there (he said, modestly <g>).
I installed the app (by file copy, except for the db which they need to share) on to her boss' computer and established a share to the folder on her machine. I went to the config file and changed the relevant lines in it from:
<add key="DB:TagTracker.mdb" value="Provider=Microsoft.Jet.OLEDB.4.0; User ID=Admin; Data Source=C:\Program Files\TagTracker\TagTracker.mdb; Persist Security Info=False" />
to:
<add key="DB:TagTracker.mdb" value="Provider=Microsoft.Jet.OLEDB.4.0; User ID=Admin; Data Source=N:\TagTracker.mdb; Persist Security Info=False" />
The app uses the regular technique of using the DB() function to establish the db connection, ala:
Dim cn As New OleDbConnection(db("TagTracker.mdb"))
As I said, EVERYTHING works on HER workstation. But on his? I can open the app, retrieve my objects, and even execute a database compact operation. But I get a DataPortal failure when I try to save the app's main EditableRootObject.
When I opened the database with Access from his computer, I get a notification that the database is Read-Only even though its read-only flag isn't showing up on the file properties in Windows Explorer and neither the app nor the database are in use on the other machine.
I have gone into permissions on the shared drive and given him Full Control. I even changed the .NET 1.1 CodeAccessSecurity to TrustAll for anything from that share.
Still no joy.
Any ideas? Thanks in advance.
How would I find that Read-Only attribute on the sharing permissions. I can't find it in the UI offered in Windows Explorer. But I'm not used to work with this stuff, so I"m probably walking right past it without realizing.
Q
Whenever you open a JET database it has to create a .ldb file for locking purposes.
If it can't create the file you get the READONLY error.
This is very common when trying to run a .mdb from a CD drive.
Give your user permission to create files in the shared folder and it should be fine.
If you open the .mdb in Exclusive mode then it won't try and create the .ldb file.
But then your app is single user.
Joe
Thanks for the help on this. I discovered that the I was confusing the user's logon on for his OWN machince (which couldn't gain access) with the one set up for him on the host computer.
I never could figure out how to identify ONLY him among other users trying to gain access from the network, but I was able to give Everyone permission. Since no one else knows the app is even here, this is probably safe until tomorrow when their IT guy can come up with something better.
Thanks again.
Thanks for that. I don't know if the passwords are the same or not.
On her computer (the host), his user shows up for permissions as Matt/TAX1 and TAX1 is her machine. His is TAX2 and no TAX2 shows up for permissions use on the share.
There are other servers in their environment (a dozen or more) so I'd bet that they are part of a domain. So this is definitely worth pursuing.
Thanks again!
Copyright (c) Marimer LLC