Skip to content

Instantly share code, notes, and snippets.

@wankdanker
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wankdanker/80164d204b19814b88b4 to your computer and use it in GitHub Desktop.
Save wankdanker/80164d204b19814b88b4 to your computer and use it in GitHub Desktop.

/etc/ld.so.conf.d/psql.conf

#pervasive sql libraries
/usr/local/psql/lib/

Then issue sudo ldconfig

odbcinst.ini

[psql]
Description = Pervasive SQL
Driver      = /usr/local/psql/lib/libodbcci.so.10.30.017.000
UsageCount  = 1
Threading   = 3 

odbc.ini

[test_dsn]
Driver          = psql
Description     = Pervasive ODBC Client Interface: server.domain.com:1583/test_dsn
ServerDSN       = test_dsn
ServerName      = server.domain.com:1583
UID             = user
PWD             = password
OpenMode        = 0
PvTranslate     =

node-odbc binding.gyp

{
  'targets' : [
    {
      'target_name' : 'odbc_bindings',
      'sources' : [ 
        'src/odbc.cpp',
        'src/odbc_connection.cpp',
        'src/odbc_statement.cpp',
        'src/odbc_result.cpp',
        'src/dynodbc.cpp'
      ],
      'defines' : [
      ],
      'conditions' : [
        [ 'OS == "linux"', {
          'libraries' : [ 
            '-lodbc' 
          ],
          'cflags' : [
            '-g'
          ]
        }],
        [ 'OS == "mac"', {
          'libraries' : [
            '-L/usr/local/lib',
            '-lodbc' 
          ]
        }],
        [ 'OS=="win"', {
          'sources' : [
            'src/strptime.c',
            'src/odbc.cpp'
          ],
          'libraries' : [ 
            '-lodbccp32.lib' 
          ]
        }]
      ]
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment