|
| Author |
Message |
David Weisz
Joined: 04 Oct 2007 Posts: 1
|
Posted: Wed Sep 20, 2006 10:08 am Post subject: problem on opening Access in window service |
|
|
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 |
|
 |
Tony Proctor
Joined: 04 Oct 2007 Posts: 1051
|
Posted: Wed Sep 20, 2006 11:00 pm Post subject: Re: problem on opening Access in window service |
|
|
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 |
|
 |
David Weisz
Joined: 04 Oct 2007 Posts: 2
|
Posted: Thu Sep 21, 2006 3:06 am Post subject: Re: problem on opening Access in window service |
|
|
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 |
|
 |
Tony Proctor
Joined: 04 Oct 2007 Posts: 1051
|
Posted: Thu Sep 21, 2006 2:24 pm Post subject: Re: problem on opening Access in window service |
|
|
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 |
|
 |
David Weisz
Joined: 04 Oct 2007 Posts: 2
|
Posted: Thu Sep 21, 2006 8:26 am Post subject: Re: problem on opening Access in window service |
|
|
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 |
|
 |
|
|