First of all you have to know the IP for the server or you can also use the server name as well, then prepare the connection string like below :-
Server=192.168.10.20;Database=myDataBase;User Id=myUsername;
Password=myPassword;
Then to fetch data from this remote database server using this connection string is as follows :-
public DataSet GetData()
{
DataSet myDataSetset=new DataSet();
string strConnectionString = "write your connection string here";
string strQuery = "Select * From Person";
using (SqlConnection connection = new SqlConnection(strConnectionString))
{
SqlDataAdapter dAdapter=new SqlDataAdapter();
dAdapter.SelectCommand=new SqlCommand(strQuery, connection);
dadapter.Fill(myDataSetset);
}
return myDataSetset;
}
This above method will fetch data from the remote server and return you the data in DataSet.
Hope this will be helpful and fulfils what you want.
Please let me know if any further help you need on this.