Open mtrezzi opened 8 years ago
Hi @mtrezzi! I'm not sure I can help you all the way through this, but you might try enabling debugging in the odbc module (https://github.com/wankdanker/node-odbc#debug). At least we can then see where it is getting internally before crashing.
Hi @wankdanker! I enabled debugging in the odbc module. Now the program prints out continuously the following line:
ODBC::GetColumnValue - String: index=2 name=T type=93 len=38 value=2 ret=0 bufferLength=1048575
The column 2 is the TIMESTAMP Now the program remains stuck in a loop.
My best guess is that the Firebird TimeStamp types maps to some ODBC type other than SQL_DATETIME or SQL_TIMESTAMP. A quick look at /usr/include/sql.h indicates that SQL_TYPE_TIMESTAMP has the value 93 that is being reported in the debug output. I'd suggest trying to add a case for SQL_TYPE_TIMESTAMP at https://github.com/wankdanker/node-odbc/blob/master/src/odbc.cpp#L418, then recompile and try again.
Thank you for your kind cooperation and your prompt reply. I will try it and I will let you know.
Massimiliano
Da: Dan VerWeire notifications@github.com Inviato: giovedì 14 aprile 2016 15.37 A: w1nk/node-odbc Cc: Massimiliano Trezzi Oggetto: Re: [w1nk/node-odbc] Firebird, TimeStamp,Windows: Process finished with exit code 0xC0000005 (#102)
My best guess is that the Firebird TimeStamp types maps to some ODBC type other than SQL_DATETIME or SQL_TIMESTAMP. A quick look at /usr/include/sql.h indicates that SQL_TYPE_TIMESTAMP has the value 93 that is being reported in the debug output. I'd suggest trying to add a case for SQL_TYPE_TIMESTAMP at https://github.com/wankdanker/node-odbc/blob/master/src/odbc.cpp#L418, then recompile and try again.
You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/w1nk/node-odbc/issues/102#issuecomment-209945578
Hi @wankdanker! Your solution that you suggest works. Thanks!
Hi,
I'm using node-odbc with firebird 2.5 and a dialect 3 database. Node.js crashes and the process finishes with exit code 0xC0000005 when my application executes a query containing timestamp fields .
Here is the code to create table and insert data:
Here is the node.js code:
I never get "closing" nor "done" log messages, but the system crashes during "db.query" execution.
Here is the WebStorm debugger console output: