diff --git a/odbc.js b/odbc.js
index <HASH>..<HASH> 100644
--- a/odbc.js
+++ b/odbc.js
@@ -117,9 +117,11 @@ Database.prototype.open = function(connectionString, callback) {
   }
   
   self.dispatchOpen(connectionString, function (err) {
-    self.connected = true;
-    self.processQueue();
-    
+    if (!err) {
+      self.connected = true;
+      self.processQueue();
+    }
+
     return callback(err);
   });
 };
Don't set connected to true when the connect failed