• thephillgreggan (1/26/2015)


    hi

    i have a C# windows app trying to access database based the connection string stored in teh app.config file

    Here is my app.config parameters

    <?xml version="1.0" encoding="utf-8" ?>

    <configuration>

    <connectionStrings>

    <add name="con1" connectionString="data Source=127.0.0.1\sinclair;initial catalog=kingsroad;uid=balrock;pwd=123456;integrated security=True" />

    </connectionStrings>

    </configuration>

    the reason i want to put an ip address on connection string i just want to create connection strings as people do in their work. When the app tried access the connection string it gives the error in the attachment.

    becuase i havent used this user/password for a long time I'm pretty sure the user name and password is correct but i have the following questions

    1. Assume the user and password is incorrect, is there way to reset this?

    2. what other configuration that i need to do in order to make teh C# app access this Database?

    thaks

    I notice a few things in your connection string that don't look right:

    1. The IP is a loopback IP also used for connecting to the local host. Is the application on the same server as your SQL server?

    2. You have supplied a username and password in the connection string but then specified to use integrated security which doesn't make sense.

    MCITP SQL 2005, MCSA SQL 2012