title: Connect to external SQL database
body: <p>I'm writing Windows 10 Desktop app (UWP C#)</p>
  
  <p>I try to access  database.</p>
  
  <p>I read that I can't do it directly, but I can do it using WCF</p>
  
  <p>I added WCF Service and added this code</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Data;
  using System.Data.SqlClient;
  using System.Linq;
  using System.Runtime.Serialization;
  using System.ServiceModel;
  using System.Text;
  
  namespace WCFtoDB
  {
      // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
      [ServiceContract]
      public interface IService
      {
  
          [OperationContract]
          DataSet querySql();
      }
      public class Service : IService
      {
          /// &lt;summary&gt; 
          /// Запрос данных в TestTable 
          /// &lt;/summary&gt; 
          /// &lt;returns&gt;&lt;/returns&gt; 
  
          SqlConnection sqlCon = new SqlConnection("Data Source=(local);Initial Catalog=Test;Integrated Security =SSPI;");
          public DataSet querySql()
          {
              try
              {
                  sqlCon.Open();
                  string strSql = "select Title, Text from TestTable";
                  DataSet ds = new DataSet();
                  SqlDataAdapter sqlDa = new SqlDataAdapter(strSql, sqlCon);
                  sqlDa.Fill(ds);
                  return ds;
              }
              finally
              {
                  sqlCon.Close();
              }
          }
      }
  </code></pre>
  
  <p>My SQL database is on this adress (<code>144.76.133.122</code>)</p>
  
  <p>Where is I need to write this adress?</p>
  
  <p>And do I need to have table on BD or no?</p>