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
PACCAST-DEVAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PACCAST-DEVAuthor Commented:
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
Jim P.Commented:
>> 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
Kevin CrossChief Technology OfficerCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

PACCAST-DEVAuthor Commented:
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
Jim P.Commented:
>> 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kevin CrossChief Technology OfficerCommented:
Agree with jimpen.
0
PACCAST-DEVAuthor Commented:
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
Kevin CrossChief Technology OfficerCommented:
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
Kevin CrossChief Technology OfficerCommented:
And if this application is running on the Citrix server, then an alternative is to change path to:

C:\Furnace\DBProgress.mdb
0
Jim P.Commented:
<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
Kevin CrossChief Technology OfficerCommented:
<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
Jim P.Commented:
<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
PACCAST-DEVAuthor Commented:
ok, thanks all.
I got it running by using the C:\Furnace\DBProgress.mdb pathname and giving read/write access to the folder.
 
0
Jim P.Commented:
Glad to be of assistance. May all your days get brighter and brighter.
0
Kevin CrossChief Technology OfficerCommented:
Definitely our pleasure.  Jim thanks for the additional discussion.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Citrix

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.