January 26, 2015 at 7:43 pm
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
January 26, 2015 at 9:59 pm
Quick thought, is TCP/IP enabled?
😎
January 27, 2015 at 5:52 am
thephillgreggan (1/26/2015)
hii 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
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply