3

I use this lib to connect to embedded firebird database:

https://github.com/xdenser/node-firebird-libfbclient

after "cloning" and "npm install" i got the following error message:

con.connectSync('test.FDB','sysdba','masterkey','');
Error: While connecting - unsupported on-disk structure for file D:\FIREBIRD-TEST\test.FDB; found 11.2, support 12.0

I also try to use an older version of firebird (ver 2.1.15). With the following error:

module.js:355
  Module._extensions[extension](this, filename);
                               ^
Error: Das angegebene Modul wurde nicht gefunden.
D:\firebird-test\firebird\build\Release\binding.node
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (D:\firebird-test\firebird\firebird.js:1:77)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
robert
  • 797
  • 3
  • 9
  • 23

1 Answers1

6

You get this error:

unsupported on-disk structure for file D:\FIREBIRD-TEST\test.FDB; found 11.2, support 12.0

This means that you try to open a Firebird 2.5 database (ODS 11.2) on Firebird 3. Firebird 3 only supports On-Disk Structure (ODS) version 12. You will need to upgrade your database by backing it up with Firebird 2.5 (+ Firebird 2.5 gbak) and restoring it under Firebird 3 (+ Firebird 3 gbak). See also ODS (On-Disk Structure) Changes in the Firebird 3 release notes.

The other error seems unrelated, and if I had to guess - I don't know node.js - could mean that you tried a 32 bit install instead of a 64 bit install (or the other way around), or that you didn't use fbembed.dll. In Firebird 3 Firebird embedded is delivered through fbclient.dll + engine12.dll, whereas Firebird 2.5 and earlier had a separate fbembed.dll.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • Thanks Mark! Ok, I installed Version 2.5 instead of 3.0 now. Now I try to replace all "flclient_ms.lib" with "lfbembed_ms.lib". But there is noch embedded.lib in "lib" folder. https://github.com/xdenser/node-firebird-libfbclient/blob/master/binding.gyp Where I can find the library? – robert Apr 29 '16 at 05:42
  • 1
    You need to use the dll, not the .lib as far as I know. Otherwise check the Firebird embedded download package. – Mark Rotteveel Apr 29 '16 at 05:54
  • i just found this tutorial: https://groups.google.com/forum/#!msg/nodejs/IoRlz2hT24I/K0bjHT-YhKgJ Were I find the embedded package for version 2.5? – robert Apr 29 '16 at 06:07
  • 1
    @robert See http://www.firebirdsql.org/en/firebird-2-5-5/ under 32-bit Embedded or 64-bit Embedded – Mark Rotteveel Apr 29 '16 at 06:28
  • BTW: Are you sure you want to use embedded, and not just a normal Firebird server install. – Mark Rotteveel Apr 29 '16 at 06:28
  • 1
    And if all else fails, just rename fbembed.dll to fbclient.dll; they have the same API. – Mark Rotteveel Apr 29 '16 at 06:31
  • Thanks a lot! It's a little bit confusing, because in binding.gyp there is a reference to a lib and not a dll. Where I should place the renamed dll? – robert Apr 29 '16 at 07:34
  • [ 'OS=="win" and target_arch=="x64"', { "libraries" : [ '<(module_root_dir)/fb/lib64/fbembed.dll' ] } ], I first try to replace the client lib with embed.dll configure and install with node-gyp...but when i do npm install I got the following error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1 – robert Apr 29 '16 at 07:35
  • C:\Program Files\Firebird\Firebird_2_5\bin found the folder...but replace with embed did not work. still the same moudle.js:355 error. – robert Apr 29 '16 at 07:42
  • @robert I think you might need someone who knows node.js for that. – Mark Rotteveel Apr 29 '16 at 08:48