sql 2005 connection string

  • Hi guys,

    kinda new in sql 2005. looked for a newbie section but could find one. so had no choice. this may be a dumb question please excuse my dumbness.

    This is my question.

    I am runnin 2003 server enterprise r2 edition.

    have sql 2005 enterprise installed in it.

    I am a vb programmer so kind developin an app to work around the network. just wanted to if i install client components in the other comps in the network would this connection string work.

    Provider=SQLOLEDB.1;Password=dhananjaya;Persist Security Info=True;User ID=sa;Initial Catalog=sunlanka;Data Source=MYSERVER\sunlanka

    MYSERVER is the computer name which has server 2003 and sql 2005 enterprise installed on. sunlanka is the database name.

    If i use the above connection string from any computer on the network would it recognise the sql server on myserver?

    do i have to configure anything when i am installing client part on the client computers?

    If the above doesnt work, do u think the SQL server will show up when i go to set up datasources in admin tools in control panel in client computers?

    i am unable to test the scenario coz i have access to only one comp. the comp has 2005 ctp installed and doesnt let me uninstall it so i am screwed and here i am asking for ur help.

    please excuse my dumb jargon coz probably i dont kno the proper word to use. lol.

    thanks in advance.

  • Your connection string is not correct. Check out this site:

    http://connectionstrings.com/ to see the correct way to use connection strings. In your example Data Source should just be the server name and then you need "Initial Catalog=[database name]

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Yes, connection string wrong.

    from VB use something like:

    Dim CusInfo2 As SqlConnection = New SqlConnection("Data Source=servername;Initial Catalog=database;Integrated Security=True")

    Data Source=servername Change servername for the name of the server SQL is installed.

    Initial Catalog=database Change database for the name of the database your connecting to.

    Integrated Security=True This will send your domain logon to the server, make sure that your SQLserver has permissions set for your logon name.

  • will check on it. 😉

    thanks guys.

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

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