w1nk/node-odbc — pull request #55 by srlopez (2013-10-03 20:13:28+00:00)
Title: node-odbc issues with Informix

I have an Ubutun 12.04 LTS 64 + unixODBC 2.3.1 + Informix clientsdk 4.10 + node.js v0.10.20
The Informix driver is correctly instaled because isql works ok.
But when i write the code in javascript and run width node, the trace seems to call **SQLDriverConnectW.c** and crash and the trace with isql call **SQLConnect.c** and works fine.

*partial code*
```
var Database = require("odbc").Database,
db = new Database(),
cn="DSN=NIFX"

db.open(cn, function (err) { //Crash
```
Here are the partial trace too
in NODE.JS
```
[ODBC][7171][1380810558.770556][__handles.c][460]
[ODBC][7171][1380810558.770647][SQLSetEnvAttr.c][189]
[ODBC][7171][1380810558.770677][SQLSetEnvAttr.c][363]
[ODBC][7171][1380810558.781819][SQLAllocHandle.c][375]
[ODBC][7171][1380810558.782068][SQLAllocHandle.c][493]
[ODBC][7171][1380810558.782802][SQLSetConnectAttrW.c][332]
[ODBC][7171][1380810558.782922][SQLSetConnectAttrW.c][616]
[ODBC][7171][1380810558.782968][SQLDriverConnectW.c][290]
Entry:
Connection = 0x7fc6000008c0
Window Hdl = (nil)
Str In = [DSN=NIFX][length = 9]
Str Out = (nil)
Str Out Max = 0
Str Out Ptr = (nil)
Completion = 0
UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'

[ODBC][7171][1380810558.787449][SQLDriverConnectW.c][699]
Exit:[SQL_ERROR]
```

Running isql

```
[ODBC][7151][1380810414.400667][__handles.c][460]
[ODBC][7151][1380810414.400743][SQLAllocHandle.c][375]
[ODBC][7151][1380810414.400773][SQLAllocHandle.c][493]
[ODBC][7151][1380810414.400803][SQLConnect.c][3700]
Entry:
Connection = 0x63d070
Server Name = [NIFX][length = 4 (SQL_NTS)]
User Name = [NULL]
Authentication = [NULL]
UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'

[ODBC][7151][1380810414.803879][SQLConnect.c][4273]
Exit:[SQL_SUCCESS]
```

Thanks in advance
*Santi*