Click here to Skip to main content
15,877,859 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
i have build a service that connect db with Android apps ,now problem is that i running service on a laptop which is on same network on which my db is present,laptop is connected through wi fi to the wired network. for the functioning of android app ,laptop on which i configered the service and mobile that is using app must be on same network.i previously using following connection string
C#
string con_string = "Data Source=sajid-pc;Initial Catalog=CTPHR;Integrated Security=True";

how do i modify this string that it can connect with sql server ,make service and apps working properly
Posted
Comments
virusstorm 16-Jun-15 11:31am    
I'm not sure I follow what your issue is, but if you need to change the SQL server you are using, simply replace "sajid-pc" for the "Data Source" attribute of the connection string with the desired SQL Server IP or name.

Check out this for more details:
https://www.connectionstrings.com/sql-server/

1 solution

Use ip address in place of "sajid-pc". You can also use server name instead(if there).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900