w1nk / node-odbc

unixODBC bindings for node
MIT License
90 stars 101 forks source link

endless loop #106

Open rbartholomay opened 8 years ago

rbartholomay commented 8 years ago

Hi,

i use the odbc with the "AR System ODBC Driver". it seems that dthe driver did not respond with the correct info if is select some columns. In my case there is an endless loop when i select a char column. I did an odbc protocoll, there is the data, but it seems that the fetchall have a problem. Any idea?

This is the part of an endless loop:

node  --harmony 1778-2530   EXIT  SQLGetData  with return code 0 (SQL_SUCCESS)
        HSTMT               0x001328C8
        UWORD                        3 
        SWORD                       -8 <SQL_C_WCHAR>
        PTR                 0x059D0020 [      20] "Zugewiesen"
        SQLLEN               1048575
        SQLLEN *            0x003DF514 (20)

node  --harmony 1778-2530   ENTER SQLGetData 
        HSTMT               0x001328C8
        UWORD                        3 
        SWORD                       -8 <SQL_C_WCHAR>
        PTR                 0x059D0020 
        SQLLEN               1048575
        SQLLEN *            0x003DF514

node  --harmony 1778-2530   EXIT  SQLGetData  with return code 0 (SQL_SUCCESS)
        HSTMT               0x001328C8
        UWORD                        3 
        SWORD                       -8 <SQL_C_WCHAR>
        PTR                 0x059D0020 [      20] "Zugewiesen"
        SQLLEN               1048575
        SQLLEN *            0x003DF514 (20)

node  --harmony 1778-2530   ENTER SQLGetData 
        HSTMT               0x001328C8
        UWORD                        3 
        SWORD                       -8 <SQL_C_WCHAR>
        PTR                 0x059D0020 
        SQLLEN               1048575
        SQLLEN *            0x003DF514

node  --harmony 1778-2530   EXIT  SQLGetData  with return code 0 (SQL_SUCCESS)
        HSTMT               0x001328C8
        UWORD                        3 
        SWORD                       -8 <SQL_C_WCHAR>
        PTR                 0x059D0020 [      20] "Zugewiesen"
        SQLLEN               1048575
        SQLLEN *            0x003DF514 (20)
rbartholomay commented 8 years ago

the problem is the loop in odbc.cpp. in my case the one column index will be read again and again. In the moment i remove the loop - but this cannot be the solution