title: How to connect remotely with Sybase SQLAnywhere.SAConnection?
body: <p>I'm trying to connect with <code>.net</code> to a remote sybase sql anywhere database.</p>
  
  <p>I don't see much info online how to connect, mostly <code>ODBC</code> or <code>DSN</code> files.</p>
  
  <p>I tried this connection string:</p>
  
  <pre><code>Data Source=myserver.com;Port=2638;Uid=myuser;Pwd=mypass
  </code></pre>
  
  <p>Which gives the following error</p>
  
  <blockquote>
    <p>Invalid connection string. Invalid or missing keyword near 'Port'
    Parameter name: connectionString</p>
  </blockquote>
  
  <p>So I tried to include the port with the server, like this:</p>
  
  <pre><code>Data Source=myserver.com:2638;Uid=myuser;Pwd=mypass
  </code></pre>
  
  <p>Which gives a new error:</p>
  
  <blockquote>
    <p>DSN 'myserver:2638' does not exist</p>
  </blockquote>
  
  <p>So, what is the correct connection string?</p>
  
  <p>PS. Using sybase central, I was able to connect to the database, so it's not a network / firewall / port issue.</p>
  
  <p>Thanks!</p>