views:

56

answers:

1

I have a connection made with a user name say ABC. In a method I create a new instance of sqlconnection named connection1 using the same connectionstring as that of the previous connection. When connection1.open() is issued it gives an exception stating that Login has failed for the user ABC. When SQL is able to connect to the user ABC for the first connection why does it fail for the second? I am using MARS=true in the connectionstring.

Thanks

A: 

What is the exact error please? And the code?

You could be connecting to a database where you have no rights, which gives a different error to a wrong password.

gbn
The exact error is "Login failed for user ABC". The login has the role of dbowner and the password info is correct.
Priya