By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,662 Members | 1,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,662 IT Pros & Developers. It's quick & easy.

Error opening db in service

P: n/a
Hi

My app is in vb.net but the backend db is access. I am posting my question
here as there is more access expertise here than in vb.net group.

Here is the problem; I am opening a connection on a shared access db as
below.

Conn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLED B.4.0;" & _
"Data Source=\\Server\f\Events Data\Events Data.mdb;User
Id=admin;Password=;")

Conn.open()

This works fine when used in a vb.net win app. The problem is that as soon
as I turn the app into a service or run it using windows scheduler I get
error on conn.open statement. 'The Microsoft Jet database engine cannot open
the file '\\Server\f\Events Data\Events Data.mdb'. It is already opened
exclusively by another user, or you need permission to view its data.'.

Why would the db have a problem opening in a service compared with a normal
win app? How can I open the db in a service?

Thanks

Regards
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
What ID is the Service running under? Does it have Change permission (Read,
Write, eXecute, Delete) on the folder where the MDB is located?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:41***********************@news-text.dial.pipex.com...
Hi

My app is in vb.net but the backend db is access. I am posting my question
here as there is more access expertise here than in vb.net group.

Here is the problem; I am opening a connection on a shared access db as
below.

Conn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLED B.4.0;" & _
"Data Source=\\Server\f\Events Data\Events Data.mdb;User
Id=admin;Password=;")

Conn.open()

This works fine when used in a vb.net win app. The problem is that as soon
as I turn the app into a service or run it using windows scheduler I get
error on conn.open statement. 'The Microsoft Jet database engine cannot open the file '\\Server\f\Events Data\Events Data.mdb'. It is already opened
exclusively by another user, or you need permission to view its data.'.

Why would the db have a problem opening in a service compared with a normal win app? How can I open the db in a service?

Thanks

Regards

Nov 13 '05 #2

P: n/a
The service is running as LocalSystem. Not sure how to get it the correct
permissions.

Thanks

Regards
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:yp********************@rogers.com...
What ID is the Service running under? Does it have Change permission (Read, Write, eXecute, Delete) on the folder where the MDB is located?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:41***********************@news-text.dial.pipex.com...
Hi

My app is in vb.net but the backend db is access. I am posting my question here as there is more access expertise here than in vb.net group.

Here is the problem; I am opening a connection on a shared access db as
below.

Conn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLED B.4.0;" & _
"Data Source=\\Server\f\Events Data\Events Data.mdb;User
Id=admin;Password=;")

Conn.open()

This works fine when used in a vb.net win app. The problem is that as soon as I turn the app into a service or run it using windows scheduler I get
error on conn.open statement. 'The Microsoft Jet database engine cannot

open
the file '\\Server\f\Events Data\Events Data.mdb'. It is already opened
exclusively by another user, or you need permission to view its data.'.

Why would the db have a problem opening in a service compared with a

normal
win app? How can I open the db in a service?

Thanks

Regards


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.