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!

DB on Remote Folder that needs LAN ID Logon & DB gives permission err

Status
Not open for further replies.

hardcoder

Programmer
Feb 16, 2002
17
US
Hi

I have an access database on a remote folder on the lan. The folder is accessible using a certain lan id and pwd for logon.

I want to query this db using ADO and ODBC or OLE from a VB program. I've mapped the remote folder to F:.

Just to try it out, I create a data project from the app wizard, that uses the following connection string:

"PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=f:\db.mdb;"

But when I run it, I get an error "The database is either opened by another user, or you need permission to view its data"

I guess the problem must be with the lan logon to the remote folder - maybe i need to do that within my VB prog?

How do I do that?

What else could be the problem? Please help!
Lyra Computing
 
It sounds like you are on the right track. I can simulate the error by denying read/write permissions on my remote directory that contains an access mdb. Check the directory permissions. You might need to start out by giving full permissions and then tighten the permissions down.
 
hey cmmrfrds, thanks for replying man!

abt the query, i can't change permissions on the folder (no rights u see!). But point is, that I can open it up through windows explorer, and put in the lan id logon, and see the contents (at least read - if not write)

so could dir permissions still be a prob?
also, can i do this logon thru VB code?

thanks for helping out! Lyra Computing
 
In addition to the directory permissions, there are permissions on the file/mdb itself. Maybe this is more restrictive. If you can't get at the directories and files yourself then it is hard to determine. Can you ask the administrator to open up the permissions on the directory and file/mdb just for a test.

I am not sure about doing permissions through vba code.

Good luck.
 
Luck is what i need then! I am not so sure i'll get permissions changed..
but , fyi, i can also open the dummy database on my drive (that contains the remote linked table, remember?) OR the remote database directly (both take a heck lot of time) - and then i can run a query within access on the table.
if that works, then shouldn't ado from vb too?

Lyra Computing
 
That does seem strange. Maybe it is something in the connection string. Is this Access 2000 or 97? Did you test the connection string from the UDL wizard?

"PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=f:\db.mdb;"

There is a newer provider Microsoft.Jet.OLEDB.4.0. Why did you select the 3.51, was it because you are using Access 97?

The connection string can contain the user id and password. I believe if they are not included it defaults to 'admin' and blank password which is usual for an mdb unless it is changed. What is the version of your MDAC library?

This link has a component checker to see what version your have installed.
I use version 2.6 with Access 2000.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top