         // query-data-available and statement-complete messages. We should also batch
         // the data-available messages--dispatching an event per-DataRow would be silly.
         public function executeSimpleQuery(sql:String, handler:IQueryHandler):void {
-            if (!_rfq) {
-                throw new ArgumentError("FEBEConnection is not ready for query");
-            }
+            ensureConnected();
+            ensureReady();
             _rfq = false;
             _queryHandler = handler;
             send(new Query(sql));
         }
 
         public function executeQuery(sql:String, params:Array, handler:IQueryHandler):void {
+            ensureConnected();
+            ensureReady();
             // > parse(statement)
             // < parseComplete | errorResponse
             // > bind(portal)


        public function close():void {
            if (_connected) {
                try {
                    if (_broker.connected) {
                        _broker.send(new Terminate());
                        _broker.close();
                    }
                } catch (e:Error) {
                    LOGGER.warn("Could not shut down cleanly: " + e.message);
                }
                _connected = false;
            }            

        }

        public function connect(handler:IConnectionHandler):void {
            if (_connected) {
                onProtocolError(new ProtocolError("Already connected"));
            }
            _connHandler = handler;
            _connecting = true;

