msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem on opening Access in window service

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE Automation
Author Message
David Weisz



Joined: 04 Oct 2007
Posts: 1

PostPosted: Wed Sep 20, 2006 10:08 am    Post subject: problem on opening Access in window service Reply with quote

hi,
for some reason this line 'mdbFile.OpenCurrentDatabase(mdbPath)'
fails to work on a 'window service' project
on a simple project (not service) it work's perfectly

does anyone knows why?

Archived from group: microsoft>public>vb>ole>automation
Back to top
View user's profile Send private message
Tony Proctor



Joined: 04 Oct 2007
Posts: 1051

PostPosted: Wed Sep 20, 2006 11:00 pm    Post subject: Re: problem on opening Access in window service Reply with quote

You didn't tell us the error, but it sounds like a permission problem. What
account is your service running under? If it's the default LocalSystem
account then this has less capabilities than a normal login account (e.g. no
network access). How have you implemented your Service? If you're not using
VB6 then you could be in the wrong newsgroup

Tony Proctor

"David Weisz" wrote in message@microsoft.com...
> hi,
> for some reason this line 'mdbFile.OpenCurrentDatabase(mdbPath)'
> fails to work on a 'window service' project
> on a simple project (not service) it work's perfectly
>
> does anyone knows why?
Back to top
View user's profile Send private message
David Weisz



Joined: 04 Oct 2007
Posts: 2

PostPosted: Thu Sep 21, 2006 3:06 am    Post subject: Re: problem on opening Access in window service Reply with quote

Thank you for the quick reply

I dont get any error message. the app just waits (not doing anything)
untill i close the access service (MSACCESS.EXE) through the window task
manager, and than the service stops

Yes, it is the default LocalSystem, and i can't change it to LocalService
because
the lines:
Dim ExcelObj As New Microsoft.Office.Interop.Excel.Application
Dim mdbFile As New Microsoft.Office.Interop.Access.Application

don't work that way (dont know why)

and like wrote before, it works perfectly in a simple project

Thx for your help

"Tony Proctor" wrote:

> You didn't tell us the error, but it sounds like a permission problem. What
> account is your service running under? If it's the default LocalSystem
> account then this has less capabilities than a normal login account (e.g. no
> network access). How have you implemented your Service? If you're not using
> VB6 then you could be in the wrong newsgroup
>
> Tony Proctor
>
> "David Weisz" wrote in message
> @microsoft.com...
> > hi,
> > for some reason this line 'mdbFile.OpenCurrentDatabase(mdbPath)'
> > fails to work on a 'window service' project
> > on a simple project (not service) it work's perfectly
> >
> > does anyone knows why?
>
>
>
Back to top
View user's profile Send private message
Tony Proctor



Joined: 04 Oct 2007
Posts: 1051

PostPosted: Thu Sep 21, 2006 2:24 pm    Post subject: Re: problem on opening Access in window service Reply with quote

As I said David, this newsgroup is for "Classic VB" (VB6 and below). Look
for groups with dotnet in their name for VB.Net answers. I'm not being mean.
It's just that the languages are very different. For instance, it's
possible - but a lot more difficult - to write a Service in VB6. This was my
clue that you might have actually been using VB.Net

Tony Proctor

"David Weisz" wrote in message@microsoft.com...
> Thank you for the quick reply
>
> I dont get any error message. the app just waits (not doing anything)
> untill i close the access service (MSACCESS.EXE) through the window task
> manager, and than the service stops
>
> Yes, it is the default LocalSystem, and i can't change it to LocalService
> because
> the lines:
> Dim ExcelObj As New Microsoft.Office.Interop.Excel.Application
> Dim mdbFile As New Microsoft.Office.Interop.Access.Application
>
> don't work that way (dont know why)
>
> and like wrote before, it works perfectly in a simple project
>
> Thx for your help
>
> "Tony Proctor" wrote:
>
> > You didn't tell us the error, but it sounds like a permission problem.
What
> > account is your service running under? If it's the default LocalSystem
> > account then this has less capabilities than a normal login account
(e.g. no
> > network access). How have you implemented your Service? If you're not
using
> > VB6 then you could be in the wrong newsgroup
> >
> > Tony Proctor
> >
> > "David Weisz" wrote in message
> > @microsoft.com...
> > > hi,
> > > for some reason this line 'mdbFile.OpenCurrentDatabase(mdbPath)'
> > > fails to work on a 'window service' project
> > > on a simple project (not service) it work's perfectly
> > >
> > > does anyone knows why?
> >
> >
> >
Back to top
View user's profile Send private message
David Weisz



Joined: 04 Oct 2007
Posts: 2

PostPosted: Thu Sep 21, 2006 8:26 am    Post subject: Re: problem on opening Access in window service Reply with quote

OK, Thx

"Tony Proctor" wrote:

> As I said David, this newsgroup is for "Classic VB" (VB6 and below). Look
> for groups with dotnet in their name for VB.Net answers. I'm not being mean.
> It's just that the languages are very different. For instance, it's
> possible - but a lot more difficult - to write a Service in VB6. This was my
> clue that you might have actually been using VB.Net
>
> Tony Proctor
>
> "David Weisz" wrote in message
> @microsoft.com...
> > Thank you for the quick reply
> >
> > I dont get any error message. the app just waits (not doing anything)
> > untill i close the access service (MSACCESS.EXE) through the window task
> > manager, and than the service stops
> >
> > Yes, it is the default LocalSystem, and i can't change it to LocalService
> > because
> > the lines:
> > Dim ExcelObj As New Microsoft.Office.Interop.Excel.Application
> > Dim mdbFile As New Microsoft.Office.Interop.Access.Application
> >
> > don't work that way (dont know why)
> >
> > and like wrote before, it works perfectly in a simple project
> >
> > Thx for your help
> >
> > "Tony Proctor" wrote:
> >
> > > You didn't tell us the error, but it sounds like a permission problem.
> What
> > > account is your service running under? If it's the default LocalSystem
> > > account then this has less capabilities than a normal login account
> (e.g. no
> > > network access). How have you implemented your Service? If you're not
> using
> > > VB6 then you could be in the wrong newsgroup
> > >
> > > Tony Proctor
> > >
> > > "David Weisz" wrote in message
> > > @microsoft.com...
> > > > hi,
> > > > for some reason this line 'mdbFile.OpenCurrentDatabase(mdbPath)'
> > > > fails to work on a 'window service' project
> > > > on a simple project (not service) it work's perfectly
> > > >
> > > > does anyone knows why?
> > >
> > >
> > >
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group