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
514 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 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