Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vb.net app running on citrix server can't open an access database

Posted on 2008-10-22
15
Medium Priority
?
775 Views
Last Modified: 2012-05-05
When my vb.net program running on a citrix server tries to open an access database I get the error:
The MS Jet DB engine cannot open the file "blah....". It is already opened exclusively by another user or you need permission to view it's data.

I have the DB in the same folder as the app. When I log onto the citrix server I can run the app fine, but get the above error when running the program on a terminal.

Any ideas?
thankks,
bmutch
0
Comment
Question by:PACCAST-DEV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 4
15 Comments
 

Author Comment

by:PACCAST-DEV
ID: 22781436
here is the connection code from the program:
 
myConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & AccessFilePath & ";" & _
"User Id=admin;Password=;"
myOleDbConnection = New OleDb.OleDbConnection(myConnectionString)
myOleDbConnection.Open()
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22781469
>> above error when running the program on a terminal.

Are you an admin or regular user on the TS session?

Does the user have full modify permissions to the folder the the mdb resides in?

Is anyone else in it at the same time?

Is there a residual ldb file hanging around that is owned by admin?
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22781510
How is the AccessFilePath specified.  Is it the absolute path OR a relative path?

I ask as I have two thoughts.  Usually from terminal server connection, users are very limited in terms of rights to local machine (server).  Therefore check the policies and/or NTFS rights to the MDB file.  You can try just opening the MDB file directly from terminal session if MS Access is one of the published applications.

Other thought, is that the application when running as a published application is starting from a different directory location; therefore, any relative references to Access file are not successful.  Try with the full path if not already coded that way OR a datasource defined in system DSN on citrix server.  

Regards,
Kevin
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:PACCAST-DEV
ID: 22781641
regular user on the terminal
user has read-only permissions to the DB
noone else is in it
no ldb file is there
Private AccessFilePath As String = "\\citrix-01\c$\Furnace\DBProgress.mdb"
 
0
 
LVL 38

Accepted Solution

by:
Jim P. earned 1000 total points
ID: 22781689
>> user has read-only permissions to the DB

That is most likely the problem. Anything accessing an Access DB needs to have permissions to create an ldb file in the same folder that the DB resides on. Change the user's (groups') permission on the folder to have read/write/create and delete and see how it goes.
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22781738
Agree with jimpen.
0
 

Author Comment

by:PACCAST-DEV
ID: 22781751
I gave the user's group full control to both the folder and the DB, logged on as the user to the citrix server, ran the program and still got the error msg...
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22781753
And since you are using a share to access, you may need to check the share permissions as the most restrictive will be applied.

It is fine to grant modify (I would reserve FULL for system/administrators) to specific groups that need access and then let the NTFS right of C: and Furnace folder handle where you want restrictions OR create a share directly on the Furnace folder and give it modify in both share and NTFS permissions for the user/group of users connecting via terminal services and update code to use that share path.

HTH
0
 
LVL 60

Assisted Solution

by:Kevin Cross
Kevin Cross earned 1000 total points
ID: 22781769
And if this application is running on the Citrix server, then an alternative is to change path to:

C:\Furnace\DBProgress.mdb
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22781816
<semi off topic>
>> a share directly on the Furnace folder and give it modify in both
>> share and NTFS permissions for the

The way we pull off shares in our company is that we give Authenticated User full control on a share. Then we granulate the real NTFS permissions on the actual folders.

Our auditors have agreed with that approach in the past, and it simplifies the share administration tremendously.
</semi off topic>
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22781873
<semi off topic>
That is how we are doing this internally as well.  The MODIFY is more on the NTFS permissions side out of habit as get the 1 or 2 users with FULL rights that end up torquing the whole setup accidentally, so usually give all rights using MODIFY versus FULL.  Other than that, I whole heartedly agree. :)
</semi off topic>
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22781953
<semi off topic>
I thoroughly agree on the MODIFY for generic groups. NT Admin groups, service, system get full. Some app admin groups will get full if they absolutely need it. I have one app that requires the user group to have full.  In general the regular user group will get MODIFY.

Usually I'll yank "Everyone" off a lot of times and maybe give Authent Users maybe read, depending on the folder and location.
</semi off topic>
0
 

Author Comment

by:PACCAST-DEV
ID: 22800048
ok, thanks all.
I got it running by using the C:\Furnace\DBProgress.mdb pathname and giving read/write access to the folder.
 
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22800138
Glad to be of assistance. May all your days get brighter and brighter.
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22800300
Definitely our pleasure.  Jim thanks for the additional discussion.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

719 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