Query error when using application role with ADO connection
I am developing an application with an ADO connection. I need to run a query on two different databases on the same server using an application role. When I run the query I get an error domainusername does not have a logon on database (referring to the second database). Is there any way around it? I have tried to create the same app role in both databases and it did the same.

Software/Hardware used:
ASKED: May 7, 2008  3:23 PM
UPDATED: May 7, 2008  6:37 PM

Answer Wiki:
You have to have the login mapped into both databases, then the application role must be defined within both databases as well. As you enter each database you need to activate the application role. The only other option which would be very less than secure would be to enable and use the guest account to get into the database then activate the application role.
Last Wiki Answer Submitted:  May 7, 2008  6:37 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 64,520 pts.