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
502 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 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

7 Experts available now in Live!

Get 1:1 Help Now