title: connect to FileMaker Server with pyodbc
body: <p>I have a FileMaker db running on FileMaker Server 14 on a Mac Mini and I'm trying to get at it with pyodbc. It's not going well.</p>
  
  <p>First, what works:</p>
  
  <pre><code>telnet 192.169.19.3 2399
  ssh Name@192.169.19.3
  tsql -H FM-Server -p 2399 -U Name -P pwd
  </code></pre>
  
  <p>One weird thing about that last one is that it gives me a seconds counter:<br>
  <code>1</code><br>
  <code>2</code><br>
  not a prompt, although I can still type commands in. I'm not sure what that means and couldn't find any info about it.</p>
  
  <p>Now, what doesn't work:</p>
  
  <pre><code>tsql -LH 192.169.19.3
  tsql -LH FM-Server
  isql FM-Server Name pwd
  </code></pre>
  
  <p>No listed info for the FileMaker Server, isql gives me <code>[ISQL]ERROR: Could not SQLConnect</code> which is just so helpful you know</p>
  
  <p>One issue is that at this point I've sort of forgotten if I should be using FM ODBC or FreeTDS as my driver in pyodbc, luckily neither of them work:</p>
  
  <pre><code>&gt;&gt;&gt; c = pyodbc.connect("DRIVER={FreeTDS};DSN=FM-Server;UID=Name;PWD=pwd")  
  pyodbc.Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')  
  &gt;&gt;&gt; c = pyodbc.connect("DRIVER={FileMaker ODBC};DSN=FM-Server;UID=Name;PWD=pwd")  
  pyodbc.Error: ('08S01', '[08S01] [unixODBC][FileMaker][FileMaker ODBC] Failed to connect to listener (2) (65535) (SQLDriverConnect)')
  </code></pre>
  
  <p>Giving it just the DSN freezes the window. Here's my configs:</p>
  
  <p>odbc.ini | /usr/local/Cellar/unixodbc/2.3.4/etc/odbc.ini </p>
  
  <pre><code>[FM-Server]
  Driver = FreeTDS
  Host = 192.169.19.3
  ServerName = FM-Server
  UID = Name
  PWD = pwd
  Port = 2399 
  </code></pre>
  
  <p>odbcinst.ini | /usr/local/Cellar/unixodbc/2.3.4/etc/odbcinst.ini </p>
  
  <pre><code>[ODBC Drivers]
  FileMaker ODBC = Installed
  FreeTDS = Installed 
  
  [FileMaker ODBC]
  Driver = /Library/ODBC/FileMaker ODBC.bundle/Contents/MacOS/fmodbc.so
  Setup  = 
  
  [FreeTDS]
  Description = FreeTDS
  Driver = /usr/local/Cellar/freetds/1.00.9/lib/libtdsodbc.0.so
  Setup = /usr/local/Cellar/freetds/1.00.9/lib/libtdsodbc.0.so
  UsageCount = 1 
  </code></pre>
  
  <p>freetds.conf | /usr/local/Cellar/freetds/1.00.9/etc/freetds.conf </p>
  
  <pre><code>[FM-Server]
      host = 192.169.19.3
      port = 2399
      tds version = 8.0 
  </code></pre>
  
  <p>Any info is much appreciated and shout to the resources <a href="http://www.cerebralmastication.com/2013/01/installing-debugging-odbc-on-mac-os-x/" rel="nofollow">here</a>, <a href="https://www.acloudtree.com/how-to-install-freetds-and-unixodbc-on-osx-using-homebrew-for-use-with-ruby-php-and-perl/" rel="nofollow">here</a>, and elsewhere for helping me get even this far.</p>