Sqlserver 2005 uses 'sqlserver Authentication' to log on. The cause of the error is: 'user 'sa 'Login Failed. This user is not associated with a trusted SQL server connection '.
The specific method is:
1: Open the SQL Server Manager! On the left side, right-click 'security' and choose 'new'. In the "Logon" dialog box, enter your login number in the login name, select 'sqlserver Authentication', and enter the password, you can cancel 'user password must be changed upon next logon. Click User ing. On the right, select the database to be mapped and check the database! In the following column, check 'db-owner' and 'public. Click 'status' and select "authorize" and "enable" in the right pane. These two items are generally default, but if they are not by default, they must be changed, otherwise, it cannot be connected! Click confirm '.
2: Find the SQL Server, right-click it on the left bar, and select the "attribute" command in the pop-up menu. In the displayed dialog box, click "security" and select "SQL Server and Windows Authentication Mode" under "Server Authentication". Check the preceding figure! Remember that this step is very important. If you do not have this step, you do not want to log on successfully! Click OK!
3: restart the service and select SQL Server Authentication Mode to log on! Enter your username and password to log on successfully! (Restart the Service)
From: http://www.cnblogs.com/zhc088/archive/2009/01/29/1381351.html