Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Ira Richard Smith

IraRichardSmith.Net

Posted

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")

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...