SqlConnection.ConnectionString parts

  • Can you specify the name of the sql service instance you want to connect to in the connection string?  If so how?  I just don't know what name\value pairs exist in the ConnectionString.

     

    Thanks in advance.

  • I am sure you are trying this with SQl server 2000.

    The connecting string should be

    sConn = "Provider=sqloledb;Data Source=myServerName\myInstanceName;Initial Catalog=myDatabaseName;User Id=myUsername;Password=myPassword"

    You have to dig for tons of dirt to get an ounce of Gold

  • Thanks for the input but I am a little confused.  What is the difference between myServerName and myInstanceName?

     

  • Starrting with SQL Server 2000. It is possible to have more than one instance of sql server on a single windows server. These instances are isolated from one another, they have separate sets of system dbs and so on.

    I hope I am clear and correct

    You have to dig for tons of dirt to get an ounce of Gold

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply