wankdanker/node-odbc — pull request #3 by lee-houghton (2013-09-27 12:37:43+00:00)
Title: Handle errors returned by SQLMoreResults

See https://github.com/w1nk/node-odbc/issues/54.

This seemed like the simplest method of fixing the issue, but perhaps you can see a better way.

At the same time I've fixed the ```DEBUG_PRINTF``` call in ```ODBC::GetSQLError``` trying to print unicode messages using the normal fprintf.

I also noticed that in ```ODBC::GetSQLError``` the ```numfields``` variable is not initialized properly and has a garbage value, even after calling SQLGetDiagField -- I've added the ```break;``` in to work around this, but it should probably be fixed properly...