Click here to Skip to main content
15,901,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I want to create a site in classic asp.
There are multiple databases, and if user is logged in then I need to check which database the user is in.

Can I do this?
If yes then please help me

Thanks in advance
Posted
Updated 11-Sep-11 21:23pm
v2
Comments
Dalek Dave 12-Sep-11 3:23am    
Edited for Clarity.

1 solution

If all the databases are on the same server, then you can assign rights to the user which you are using to connect to the database.

If you are using SQL server, then you can use stored procedure which will query different databases and return proper database name.

Please check the following for more details:

http://community.discountasp.net/showthread.php?t=11135
http://www.dbtechie.com/sql-server/how-to-reference-multiple-databases-on-the-same-server/
 
Share this answer
 
v2
Comments
Dalek Dave 12-Sep-11 3:23am    
Spot on.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900