hi there,

i have a question in connection my application to ms sql 2008.
i wrote a desktop application in visual studio 2008 in the C# language. and i have installed the MS SQl 2008 DBMS software. and when i try to connect to the MS SQL in Mixed mode authenticaion it gives and error saying Login failed for user ''.

does anybody know why is this happening???
but in windows authentication, it connects and the application runs fine. but in mixed mode i get an error as above. saying the connection is closed,
please can someone help r give some guidence,


See my post here. The login can either be

  • Windows Authentication (network authenticates user)


  • SQL Server Authentication (password in sql server authenticates user)

There is no mixed login. Mixed refers to the fact that SQL Server will authenticate either type of login.

In the management studio, run the following to determine which authentication the user in question is:

SELECT name, type_desc AuthenticationType
  FROM sys.server_principals
  WHERE type in ('U','S')

To further reiterate, use the following query and you can actually see that no password is stored for Windows Authentication users:

SELECT sp.name, sp.type_desc AuthenticationType, sl.password
  FROM sys.server_principals sp
  JOIN syslogins sl ON sp.name = sl.name
  WHERE sp.type in ('U','S')