irasmith Posted December 7, 2003 Posted December 7, 2003 When creating a connection string and using the Integrated Security option, is it necessary to specify the name of the Database as well? I am asking this as what I am working on would be used in an environment that is set up so that your Win/NT login controls the database you have access to. Given that, I wasn't sure if my own application would need to specify the database or if it could be left out of the connection string totally. Quote Ira Richard Smith IraRichardSmith.Net
mocella Posted December 8, 2003 Posted December 8, 2003 You can initialize to some general database for your connection string, but change it later using: Dim sqlConn As New SqlConnection _("server=localhost;database=TestDB") sqlConn.ChangeDatabase("specifyTheUserDBHere") Quote
irasmith Posted December 8, 2003 Author Posted December 8, 2003 Thank you for the suggestion. I am making note of it for use when my project gets to that point. Quote Ira Richard Smith IraRichardSmith.Net
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.