node-odbc icon indicating copy to clipboard operation
node-odbc copied to clipboard

odbc.Database is not a constructor

Open addlistener opened this issue 3 years ago • 1 comments


  var db = new odbc.Database();
           ^

TypeError: odbc.Database is not a constructor

odbc@^2.4.5:
  version "2.4.5"
  resolved "https://registry.yarnpkg.com/odbc/-/odbc-2.4.5.tgz#2c4972e613a7da4cdf8fbe20d8f301682cba6e47"
  integrity sha512-McvU/hj7PeT4TR+N0vUTZwFEbfeXc9Le87iPi//cehzVa05/UIrpNXavK6byvZ1hyvYwbpDzO/YvHrSxGnsccg==
  dependencies:
    "@mapbox/node-pre-gyp" "^1.0.5"
    async "^3.0.1"
    node-addon-api "^3.0.2"

addlistener avatar Sep 22 '22 01:09 addlistener

I don't think that is the constructor for odbc@^2. If you want to use that constructor, you have to install odbc@^1. Hope this helps.

wankdanker avatar Sep 22 '22 12:09 wankdanker