Re: ODBC access within a Windows Service

From: Alvin Bruney (vapordan_spam_me_not_at_hotmail_no_spamhotmail.com)
Date: 05/21/03


Date: Tue, 20 May 2003 19:44:20 -0500


Does your service have write permissions on the directory. Asp.net runs as a
special group, you must give this special group write permissions. In
addition you will want to set the permissions on the directory folder
appropriately. That's all i can think of at the moment.

"Wallace B. McClure" <wallaceb at nospam dot wallym dot com> wrote in
message news:#OTYQnyHDHA.1392@TK2MSFTNGP10.phx.gbl...
> I do not believe that this is a .NET issue, but I am stumped, so here
goes.
>
> I have a Windows Service that I have written in C#. It is a fairly
simple
> service that pulls data from various sources and puts it into a Sql
Server
> database. One of those sources is an Excel spread*** that sits on a
> remote system. I have configured the service to run as domain user and I
> am
> able to trace through my code and see that my service can see the file on
> the remote machine. The problem I am running into is that when I attempt
> to
> fill my datatable with data from excel, I get the following error
message:
>
> DIAG [HY000] [Microsoft][ODBC Excel Driver] Failure creating file.
> (-5036)
> DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr
> failed (0)
> DIAG [HY000] [Microsoft][ODBC Excel Driver] Failure creating file.
> (-5036)
>
> I have the code designed such that the actual work is done by a component
> within a project separate from the Windows Service. I have created a
> Winforms app and called my routine from the app with no problem. The
issue
> only seems to occur when I hit the ODBC driver when i am running as a
> service.
>
> Does anyone have any thoughts on this? I have searched the MS support
> knowledge base with no luck.
>
> Wally
>
> PS. I posted this in the ASP.NET group because I read something in a
french
> Microsoft ASP.NET group with this error. Too bad I can't read french.
>
>


Quantcast