Closed LexDias closed 8 years ago
I have confirmed that this is a bug in the driver which I am in the process of fixing. In the meantime, you can get around the problem by preparing a statement and executing that rather than executing it directly through the connection. Rather than:
conn.connect({...}, function() {
conn.exec('SELECT TOP 10 * FROM myTable', [], function (err, result) {
...
conn.disconnect();
...
do this:
conn.connect({...}, function() {
var stmt = conn.prepare('SELECT TOP 10 * FROM myTable' );
stmt.exec( [], function (err, result) {
...
stmt.drop();
conn.disconnect();
...
Thank you very much for your help! We've tested these mods and they worked fine!
Version 1.0.11 (just published) should fix this problem.
Thank you very much! Just updated it, rolled back those mods and everything look good.
I've downloaded v.1.0.12 and the initial problem returned. Any ideas?
We're working on a Nodejs app accessing a SQL Anywhere 16 Database.
We have an HTML page that performs two simultaneous requests to our Nodejs app. When the first one disconnects, Nodejs crashes.
These are the listeners to both requests:
This is the Nodejs crash message:
When we remove these 'conn.disconnect();' lines, everything works fine. However, all connections to the database remain open.
Any suggestions?