Re: Windows Services and SQL Server
- From: Andy <andyj@xxxxxxxxxxxxxxxxxx>
- Date: 4 May 2007 06:28:20 -0700
On May 4, 7:58 am, Diogo Alves <DiogoAl...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
yes there is a reason...
Where planning in the future use more than one database type... maybe oracle
and/or mysql
Since there is that option in the future we prefer to use odbc
"Peter Bromberg [C# MVP]" wrote:
If you are using managed code, is there any reason why you can't use the
SqlClient class with a regular SQL Server login? e.g.,
server=myserver;database=dbname;uid=user;pwd=password;
--Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Diogo Alves" wrote:
Greetings everyone,
I am trying to access my SQL Server 2005 database with a windows service,
the problem is that I can't access it!
It says ERROR [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login
failed for user 'ONEWORLD\N5DALVES$'.
ONEWORLD is my domain, N5DALVES is my computer name.... the $ appears there
like magic...
in the SQL Server I don't have that user... I have ONEWORLD\DALVES...
that's my username in the intranet...
How can I avoid this? I tried to use this connection string:
DSN=MyDataSource;Uid=TimeFiveUser;Pwd=_TimeFiveUser_;
I'm using ODBC Drivers- Hide quoted text -
- Show quoted text -
To answer your question, it looks like you need to add the oneworld
\n5dalves$, because you're running the service as local system (or
local service) which will use the machine login. Your other option is
to run the service under a differnt user account which does have
permission to the sql server.
.
- Prev by Date: Re: System Architecture / .NET Remoting
- Next by Date: Re: save bit as 0 or 1not true or false
- Previous by thread: RE: Windows Services and SQL Server
- Next by thread: Re: Windows Services and SQL Server
- Index(es):
Relevant Pages
|