Login Error when accessing MSDE from C# Win Application
From: David Sharner (dsharner_at_cygentech.com)
Date: 08/12/04
- Next message: Aaron [SQL Server MVP]: "Re: MSDE end of life?"
- Previous message: Andrea Montanari: "Re: SQL Server to MSDE conversion"
- Next in thread: Jim Young: "Re: Login Error when accessing MSDE from C# Win Application"
- Reply: Jim Young: "Re: Login Error when accessing MSDE from C# Win Application"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Aaron [SQL Server MVP]: "Re: MSDE end of life?"
- Previous message: Andrea Montanari: "Re: SQL Server to MSDE conversion"
- Next in thread: Jim Young: "Re: Login Error when accessing MSDE from C# Win Application"
- Reply: Jim Young: "Re: Login Error when accessing MSDE from C# Win Application"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|