|
-
February 18th, 2006, 03:27 PM
#1
SQL connection
I try to connect to database Northwind and I get an error while using the Open() method: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
What does it mean?
-
February 18th, 2006, 04:10 PM
#2
Re: SQL connection
Hello,
I think your sql server is set up so that it only accepts Windows Authentication. You will have to change the LoginMode key under HKEY_LOCAL_MACHINE\Software\Microsoft\MSSqlserver\MSSqlServer to a value of 2. Before doing that stop al MSSqlServer services. After changing it restart MSsqlServer.
-
February 18th, 2006, 04:36 PM
#3
Re: SQL connection
Yes, you guessed right. I changed that value to 2. Now I get such error (in the same place): Login failed for user 'sa'.
-
February 18th, 2006, 05:03 PM
#4
Re: SQL connection
Hi again,
"The default authentication mode for MSDE is Windows Authentication. MSDE installs with a built-in system administrator (SA) user account. However, because SQL Server Authentication is disabled by default, you cannot access the built-in account after a typical installation." this is from http://support.microsoft.com/default...b;en-us;319930. Follow the steps in "Connect to MSDE with SQL Server Authentication" paragraph.
Here is another article that you might find helpful :http://support.microsoft.com/default...b;en-us;322336
-
February 18th, 2006, 05:45 PM
#5
Re: SQL connection
Actually it was enough to pass a connection string, that didn`t include a password.
Nevertheless, thanks for your effort
-
February 20th, 2006, 07:20 AM
#6
Re: SQL connection
Just Go in SQL SERVER Enterprise Manager. under the logins
Set User Name = sa
and password= sa
then try again. .
-
March 31st, 2006, 04:40 PM
#7
Re: SQL connection
I have created my own database,
I set the appriopriate key value (from previous posts) to 2,
I created a user "martinez", that have all possible rights,
and I`m still getting such error:
Code:
"Login failed for user 'martinez'. The user is not associated with a trusted SQL Server connection."
Someone can help me?
thank you in advance
-
April 1st, 2006, 07:55 AM
#8
Re: SQL connection
Is the sql server setup to use both windows and sql authentication?
how to check:
Open The SQL Server Enterprise Manager
Start menu > Programs > Microsoft SQL Server > Enterprise Manager)
Expand the tree-control until you can see your server
Right click on the server name and "SQL Server Properties (Configure)" window will open
Select the Security tab
For "Authentication", select "SQL Server and Windows"
-
April 1st, 2006, 12:25 PM
#9
Re: SQL connection
Yes, I think that that was a reason, thank you for help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|