Solved

I get error 3051 when trying to connect VB with Access DB in a remote PC under W2k

Posted on 2003-11-06
5
506 Views
Last Modified: 2012-06-21
I have a VB application which tries to connect to a MS Access 2000 database located in another PC within the network. When I try to do it with the remote PC under Windows 98, it connects correctly. The problem is that I can't connect to the DB when the remote PC is under Windows 2000 Professional.  It shows me this error: << "Runtime Error 3051: The Microsoft Jet database cannot open the file '\\remotePC\SharedFolder\database.mdb'. It is already opened exclusively by another user, or you need permission to view its data" >>. I understand the error, but: The shared folder and the database have all the permissions for all the users, the remote PC is in the same LAN, the DB is not opened by another user and everything it's ok. But I still cannot connect to this remote DB located in a PC under W2K. Pls, anybody help me!.
Thanx a lot for any help and for reading this long question.
0
Comment
Question by:mjimeno
  • 3
5 Comments
 
LVL 1

Accepted Solution

by:
KeyPakt earned 180 total points
ID: 9694719
I think you must setup one account on the Windows 2000 machine that allows the calling machine to access files on it. This looks like a simple security thing which does not exist in Windows 98. Even though you are on the same network you must create an account for the calling computer.
0
 

Expert Comment

by:vimalpercy
ID: 9699393
YOu try to set up the database connection using ODBC.
Then it will help you os looking after the connection from one computer to another.
U give all the username and password criteria in odbc.
I hope this will help you.
 
0
 

Author Comment

by:mjimeno
ID: 9701877
It will be better for me, if I find a way to solve that problem, which does not include a odbc connection. I am using a DAO connection, with OpenDatabase(...), etc and it is a large code that will be quite difficult to change from DAO to ODBC, I mean all the connections and related stuff. And about the account, I have partially solve the problem by login both pc's to the same domain, but that was a recreation of the problem in the LAN of my company, and I need to solve it in my boss's company (other place), where I have not 100% access. I know that both pc's are W2K, and both are in the same workgroup, but I don't have much information about accounts and users.
0
 

Author Comment

by:mjimeno
ID: 9701936
I will appreciate if KeyPakt could give me a clue about how to create that account to connect to the db. Maybe I could try it to see what happens. That account is for the file or for the SO? thanx!
0
 

Author Comment

by:mjimeno
ID: 9704395
KeyPart and someone from my company gave me the idea to solve the problem: As easy as (it was not so easy for me) enable the user Guest, which is disabled by default in Windows 2000. In the PC under W2K where the DB is located, I went through Control Panel --> Administrative Tools --> Computer Managment, under System Tools I found Local Users and Groups. There I saw the user Guest with an X (disabled). Then I enabled it again and then anybody could run the application and connect it to the DB located there. That's all. The only doubt I have is that I don't know how secure will be for the PC under W2K if I enable the user Guest. So, thanx to KeyPart, you were the closest. Bye
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now