Login Error when accessing MSDE from C# Win Application

From: David Sharner (dsharner_at_cygentech.com)
Date: 08/12/04


Date: 12 Aug 2004 15:25:06 -0700

Hello,
I am experiencing a login problem when trying to access a named MSDE
instance via a C# windows app via ASO.Net. My computer configuration
is Win XP Pro running SQL server Developer Edition locally. I am able
to access this MSDE instance via ODBC DSN Connections, SQL Enterprise
Manager and SQL Query Analyzer. However when my code reaches the
following lines I get the following error;

----------------- CODE -----------------
SqlConnection oSqlConn = new SqlConnection("server=" +
Environment.MachineName +
"\\MSDE;database=TestDb;uid=TestUser;PWD=TestPwd;");
oSqlConn.Open();
----------------- END CODE -----------------

----------------- ERROR -----------------
Cannot open database requested in login 'TestDb'. Login fails.
Login failed for user 'TestUser'.
----------------- END ERROR -----------------

I did add the user to the MSDE Db via Enterprise manager and granted
him db_accessAdmin rights. I believe that I installed the MSDE
instance properly. The installation parameters that I used when
installing this MSDE instance are as follows;

SAPWD="sqPwd"
SECURITYMODE=SQL
INSTANCENAME="MSDE"
DISABLENETWORKPROTOCOLS=0

Any help in solving this issue would be greatly appreciated.

Sincerely,
David Sharner
CyGen Technologies
http://www.CygenTech.com



Relevant Pages

  • SQL Server is terminating due to stop request
    ... Installation of MSDE SP3A fails on XP SP2 with these messages in the log:- ... SQL Server is terminating due to 'stop' request from Service Control Manager. ... SP2 machine bought to run our software by a teacher with limited IT skills. ...
    (microsoft.public.sqlserver.setup)
  • Re: Is it possible that OLEDB connection is not available on a PC?
    ... Hmm, unlikely as it seems given your OS, corrupted MDAC installation? ... If you still have no joy, I suggest you post to a SQL Server group. ... I believe there MSDE has been updated quite ...
    (microsoft.public.inetserver.asp.db)
  • Re: error 1304 - MSDE
    ... MSDE Installation Fails on Systems That Have SQL Server 2000 ...
    (microsoft.public.de.sqlserver)
  • NTWDBLIB.DLL
    ... I recently installed MSDE 2000 Release A on my computer ... as SQL Server and got it running. ... However, since I am using cuteSQL as an SQL client, ... during MSDE Server installation. ...
    (microsoft.public.sqlserver.msde)
  • Re: Connection to SQL Server on Vista
    ... The installation of MSDE is setup to only accept NT Integrated Security ... Login with an NT account that has permissions to access the MSDE ... Dim strConnectionString as String ...
    (microsoft.public.vb.database.ado)