Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my current development environment they would like to change the username and password of SQL Server to new one but need to keep the old one at least 1 month before delete or disable it. But at the meantime both connection are need to use at the same time if one failed then try another!

So, please any idea or help on this to achieve this goal?

Thanks,
Posted

1 solution

First try with one credentials. Catch specific SQL exception if failed to connect. Inside catch block call another/same method with a separate credential. pass credential as a parameter. We have tried this way and it worked for us.
 
Share this answer
 

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