1 Reply Latest reply on Jan 19, 2016 10:28 PM by actualjon

    Any one have success working with Node ODBC and working with FM Pro 14?

    Bill.McLean

      I am working on a NODE.js project. I'm having trouble connecting to the FM database.

       

      My test program looks like:

       

      function odbcTest () {

        var db = require("odbc")(), cn = "DRIVER={FileMaker ODBC};DSN=TestFMODBC;SERVERADDRESS=127.0.0.1;UID=admin;PWD=;DATABASE=ODBCTest";

       

       

        db.openSync(cn);

        db.closeSync(cn);

        return "awesome";

      }

       

      when do a build and a test with Grunt I get the following results:

       

       

       

      Running "mochacli:all" (mochacli) task

       

       

        odbcTest

          suite 1

            1) should pass

       

       

      0 passing (63ms)

        1 failing

       

        1) odbcTest suite 1 should pass:

           Error: [unixODBC][

            at Error (native)

            at Database.openSync (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/odbc/lib/odbc.js:150:26)

            at module.exports (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/src/odbcTest.js:22:5)

            at Context.<anonymous> (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/test/odbcTest.js:23:20)

            at callFn (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runnable.js:286:21)

            at Test.Runnable.run (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runnable.js:279:7)

            at Runner.runTest (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runner.js:421:10)

            at /Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runner.js:528:12

            at next (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runner.js:341:14)

            at /Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runner.js:351:7

            at next (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runner.js:283:14)

            at Immediate._onImmediate (/Users/bill/Dropbox/Ledden Design iT/ext_dev/odbcTest/node_modules/mocha/lib/runner.js:319:5)

            at processImmediate [as _immediateCallback] (timers.js:383:17)

       

       

        • 1. Re: Any one have success working with Node ODBC and working with FM Pro 14?
          actualjon

          It looks like your Grunt is built using the unixODBC library instead of the competing iODBC library.  While unixODBC is very common on Linux, iODBC is the de facto standard on OS X (it was the only pre-installed option on OS X from 10.2 to 10.8, so nearly all commercial applications and drivers use it). 

           

          The two libraries have basically the same API but are not interchangeable.  The FileMaker ODBC driver is built using iODBC, so the Grunt application will need to be built using iODBC.

           

          Jonathan Monroe

          Actual Technologies - ODBC for OS X