I am using windows XP on my laptop. MSSQLServer Client is installed. The connection is set to use Windows authentication. My windows user name is "stephanie cat" without any password.
I use C# in VS.NET 2003 to connect to SQL Server database (a simple console application). The northwind database has been downloaded and attached to current SQL Server instance. I can view the northwind database ok in Enterprise Manager.
The connection string is:
Expand|Select|Wrap|Line Numbers
- SqlConnection mySqlConnection = new SqlConnection("server=localhost;database=Northwind;uid=sa;pwd=sa");
So I set up a user "sa" with a pwd in "local user and groups" of "computer management". It didn't work.
Then I think since the SQL server is using windows authentication, I delete "uid=sa;pwd=sa" in the connection string. It didn't work.
I changed "uid= Stephanie cat; pwd=". It didn't work.
Then i try to change SQL server connection into SQL server authentication. It failed with a message:"Login failed for user 'sa'. Reason: not associated with a trusted SQL Server connection." but how do I associated a user with a trusted SQL Server connection. does the user have to be a windows user name. But in XP, there is no DBA group. I am confused about this sa uid.
could anybody help me with it please?