n2dweb
asked on
DB Connection string using an IP address and DB instance name
I have an application that is used on 2 computers:
appComputer (177.16.177.340) & devComputer (177.16.177.341).
I use a file named AppSettings.xml to set the connection string.
The app computer only has 1 database instance so I used the IP address:
<ConStringX>Database=Clien ts; Server=177.16.177.340;Uid= This;Pwd=T hat;</ConS tringX>
and it works great.
On the DevComputer I use the computer name and the instance name:
<ConStringX>Database=Clien ts; Server=DevComputer\Demo;Ui d=This;Pwd =That;</Co nStringX>
This works as long as I am running the application on the DevComputer.
I have to be able to run the application from a different server pointing back to where the DB is located.
So how do I change the connection string to use the IP address (177.16.177.341) and the instance name (Demo)
Thanks
appComputer (177.16.177.340) & devComputer (177.16.177.341).
I use a file named AppSettings.xml to set the connection string.
The app computer only has 1 database instance so I used the IP address:
<ConStringX>Database=Clien
and it works great.
On the DevComputer I use the computer name and the instance name:
<ConStringX>Database=Clien
This works as long as I am running the application on the DevComputer.
I have to be able to run the application from a different server pointing back to where the DB is located.
So how do I change the connection string to use the IP address (177.16.177.341) and the instance name (Demo)
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think this may have solved it. (I had the wrong slash). I have to redeploy DBs to test it - I will let you know soon if it fixed it- thanks
Try:
Use just the IP address and not the instance name (177.16.177.341)
Also make sure the "SQL Agent" is running on the box you're trying to connect.