public void runImpl()
	{
		ResultWrapper rw = new ResultWrapper(strSQL, stmt);

		process = true;

		try
		{
			queryListener.onQueryMessage("executing ...");

			if(process){
				rw.executeSql();
				queryListener.onQueryMessage("statement executed");
			}		
			
			int rownum = 0;
			if(rw.getResultSet() != null)
			{
				if(process){
					queryListener.onQueryMessage("resultset received, converting ...");
					Controller.trace(3, "counting rows ...");
					rw.countRows();
					queryListener.onResult(rw);
				}
			}
			else {
				queryListener.onResult(rw);
			}

			queryListener.onQueryMessage(rw.getRows() + " rows returned, done.");
		}
		catch(Exception ex)
		{
			Controller.trace(1, ex);
			queryListener.onQueryException(ex);
		}
		finally
		{
			stmt = null;
			rw = null;
			process = false;
			Controller.trace(4, this + " resources released.");
		}

	}