Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
-
Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out
-
Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out
Does the login exist for the user? Logins are held in the master database while the users are held in each individual database. The application will fail if the login does not exist.
Upcoming FREE developer events: * Glasgow: SQL Server Managed Objects AND Reporting Services ... My website
-
Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out
Mixed mode is the correct option if you want to use SQL Authentication. You cannot turn off Windows authentication. It's most likely that the server was reinstalled with Mixed Mode disabled, i.e. Windows Authentication only. You will need the administrator to re-enable Mixed Mode. In Enterprise Manager, connect to the server, then right-click the server in the tree and select Properties. On the Security tab, ensure that Authentication is set to "SQL Server and Windows" rather than "Windows only". Click OK, then you will have to restart SQL Server.
DoEvents
: Generating unexpected recursion since 1991 -
Mixed mode is the correct option if you want to use SQL Authentication. You cannot turn off Windows authentication. It's most likely that the server was reinstalled with Mixed Mode disabled, i.e. Windows Authentication only. You will need the administrator to re-enable Mixed Mode. In Enterprise Manager, connect to the server, then right-click the server in the tree and select Properties. On the Security tab, ensure that Authentication is set to "SQL Server and Windows" rather than "Windows only". Click OK, then you will have to restart SQL Server.
DoEvents
: Generating unexpected recursion since 1991Thanks for ur reply. I have changed it to "sql server and windows" and also created a login for the domainname\username and in the connection string i have given "data source=domainname,intial catalog=appliactionname,persist security info=false" when im giving trusted connection=none then it is showning error while running the application itself so pls help me with some solution
-
Previously i have used sql authentication for my application but due to some reasons sql server 2000 was reinstalled with mixed mode(both windows and sql authentication). when i run my application "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error message is showing pls help me out
You need to associate a certain user to the database you want to access. Using Object Explorer, Go to Security -> Login, Right click Login then select New Login, create your user account. Then on the left side, select User Mapping then put a check on the database you want to access with this user account, check everything below except the denyreader and denywriter (It's up to your preference).