RE: Windows Services and SQL Server



There are managed providers for Oracle, MySQL and other RDBMS's. If you use
the Enterprise Library Data Access Block, these only need to be specified in
the configuration file. Your code does not have to change.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Diogo Alves" 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
.



Relevant Pages

  • Re: Import problems on Windows Server
    ... your OWN research the Mickeysoft ODBC drivers do NOT support ANY ... Oracle feature beyond 7.3? ... There are plenty of non MS ODBC drivers that will connect with the various editions of non-MS databases, some of the drivers are actually better. ... Free speech - I'm here to stay dude - get used to it; when you see a post relating to SQL Server or Windows I'll be there with an answer to any myth you might want to TRY and spread. ...
    (comp.databases.oracle.server)
  • Parameterized queries to different data providers
    ... I would like to build my app so it can connect to SQL Server, Oracle ... or mySQL and query data. ... Data queries should be parameterized to reduce impact of SQL ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Oracle - MySQL decision
    ... I'm suprised you've not considered Microsoft SQL Server 2005 Express edition ... I'd choose Oracle since I have used it since version 7 and I ... > MySQL 5.0 on the other hand is a close contender. ... Many potential customers have flexible site ...
    (comp.databases)
  • Re: Iseries/AS400 access to external databases
    ... You can read/write data from any RPG program to SQL Server, Oracle, MySQL or ... external clients via ODBC, service programs, etc. ... guess Oracle and MySQL might be other sources but not in our case). ...
    (comp.sys.ibm.as400.misc)
  • Re: alternative to DTS
    ... Alternatively FastReader can write data ... I used to use DTS for transferring data between Informix and SQL Server ... I now need to replicate data between Oracle ... and MySQL and need a similar tool. ...
    (microsoft.public.sqlserver.dts)