Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / August 2003



Tip: Looking for answers? Try searching our database.

Jet 4.0 Connection over a Server Drive is not working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Darren Li - 21 Aug 2003 01:49 GMT
Hi:

I created a connection (OleDbConnection) of a MS Access File on a map drive
(on the server). And I got an error:

System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot
open the file 'F:\CUPData.mdb'. It is already opened exclusively by another
user, or you need permission to view its data.

The Access file itself is neither UserID and password setup nor Access level
password setup. And it is not opened exclusively by anyone.

My code:

           Dim cnnNewCust As OleDb.OleDbConnection = _
               New
OleDb.OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Password="""";User
ID=Admin;DATA Source=F:\CUPData.mdb")
           strSQL = "Select * From AllCards_ForStore Where [Cust#] = '" &
strCustID & "'"
           Dim daNewCust As OleDb.OleDbDataAdapter = New
OleDb.OleDbDataAdapter(strSQL, cnnNewCust)
           Dim dtNewCust As DataTable = New DataTable("tblNewCust")
           daNewCust.Fill(dtNewCust)   <===== error here

I'm using a member computer within a domain for testing purpose. My network
login ID & computer both are administrator level.
If I move the access file to local drive. Every thing works fine.

Please help!!!!!!!!!!

Thank you very much.

Darren L.
Paul Clement - 21 Aug 2003 20:21 GMT
¤ Hi:
¤
¤ I created a connection (OleDbConnection) of a MS Access File on a map drive
¤ (on the server). And I got an error:
¤
¤ System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot
¤ open the file 'F:\CUPData.mdb'. It is already opened exclusively by another
¤ user, or you need permission to view its data.
¤
¤ The Access file itself is neither UserID and password setup nor Access level
¤ password setup. And it is not opened exclusively by anyone.
¤
¤ My code:
¤
¤             Dim cnnNewCust As OleDb.OleDbConnection = _
¤                 New
¤ OleDb.OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Password="""";User
¤ ID=Admin;DATA Source=F:\CUPData.mdb")
¤             strSQL = "Select * From AllCards_ForStore Where [Cust#] = '" &
¤ strCustID & "'"
¤             Dim daNewCust As OleDb.OleDbDataAdapter = New
¤ OleDb.OleDbDataAdapter(strSQL, cnnNewCust)
¤             Dim dtNewCust As DataTable = New DataTable("tblNewCust")
¤             daNewCust.Fill(dtNewCust)   <===== error here
¤
¤
¤ I'm using a member computer within a domain for testing purpose. My network
¤ login ID & computer both are administrator level.
¤ If I move the access file to local drive. Every thing works fine.

It's a permissions problem on the folder where the database is located. The user must have
Read/Write/Create and Delete permissions for the folder in order for the Jet database engine to use
the corresponding .LDB file that is create when the Access .MDB file is open for update.

Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
Darren Li - 21 Aug 2003 22:58 GMT
Hi, Paul:

Thank you very much.

The way you explain is very close to what I guess........

But I still have questions. What is the (network) user id ADO.NET is using
when it try to connect to a database on the server? The user id I login on
to the network has full permissions to that folder. That folder is actually
set to allow Everyone to access it with full permissions.

Could I find any place to put a network user id in the connection string? Or
I have to create a "Admin" user with blank password in the domain?

Thank you again

Darren L.

> ¤ Hi:
> ¤
[quoted text clipped - 13 lines]
> ¤                 New
> ¤
OleDb.OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Password="""";User
> ¤ ID=Admin;DATA Source=F:\CUPData.mdb")
> ¤             strSQL = "Select * From AllCards_ForStore Where [Cust#] = '" &
[quoted text clipped - 15 lines]
> Paul ~~~ pclement@ameritech.net
> Microsoft MVP (Visual Basic)
Paul Clement - 22 Aug 2003 22:08 GMT
¤ Hi, Paul:
¤
¤ Thank you very much.
¤
¤ The way you explain is very close to what I guess........
¤
¤ But I still have questions. What is the (network) user id ADO.NET is using
¤ when it try to connect to a database on the server? The user id I login on
¤ to the network has full permissions to that folder. That folder is actually
¤ set to allow Everyone to access it with full permissions.
¤
¤ Could I find any place to put a network user id in the connection string? Or
¤ I have to create a "Admin" user with blank password in the domain?
¤

The user ID should be the person who is logged on to the local Windows machine (or logged on to the
network share if that is what you are using).

If you're still having a problem I would check the Event log of the file server in order to
determine whether there are any security/permission events logged.

Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
Darren Li - 30 Aug 2003 01:16 GMT
Hi, Paul:

Finally I figued it out.......

Because my computer domain is different  from the user domain. (strange, I
don't understand our network guy's logic......)
To setup the userid and password, using the following config file......

\%windows%\Microsoft.NET\Framework\Version\Config folder
<!-- machine.config file -->
<system.web>
  <processModel
     enable="true"
     username="domain\user"
     password="password"
  />
</system.web>

And it works ^__^y

Thank you for your help.

> ¤ Hi, Paul:
> ¤
[quoted text clipped - 19 lines]
> Paul ~~~ pclement@ameritech.net
> Microsoft MVP (Visual Basic)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.