Link to home
Start Free TrialLog in
Avatar of PACCAST-DEV
PACCAST-DEVFlag for United States of America

asked on

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

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
Avatar of PACCAST-DEV
PACCAST-DEV
Flag of United States of America image

ASKER

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()
>> 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?
Avatar of Kevin Cross
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
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"
 
ASKER CERTIFIED SOLUTION
Avatar of Jim P.
Jim P.
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Agree with jimpen.
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...
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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<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>
<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>
<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>
ok, thanks all.
I got it running by using the C:\Furnace\DBProgress.mdb pathname and giving read/write access to the folder.
 
Glad to be of assistance. May all your days get brighter and brighter.
Definitely our pleasure.  Jim thanks for the additional discussion.