예제 #1
0
 /**
  *
  * Constructs a new tinySQLStatement object.
  * @param conn the tinySQLConnection object
  *
  */
 public TinySQLStatement(TinySQLConnection conn)
 {
     connection = conn;
     if (debug)
     {
         java.lang.SystemJ.outJ.println("connection is " + connection.toString());
     }
 }
예제 #2
0
        /**
         *
         * Execute an SQL statement and return a result set.
         * @see java.sql.PreparedStatement#executeQuery
         * @exception SQLException raised for any errors
         * @param sql the SQL statement string
         * @return the result set from the query
         *
         */
        public java.sql.ResultSet executeQuery()
        {//throws SQLException {
            lock (this)
            {
                // tinySQL only supports one result set at a time, so
                // don't let them get another one, just in case it's
                // hanging out.
                //
                result = null;

                // create a new tinySQLResultSet with the tsResultSet
                // returned from connection.executetinySQL()
                //
                if (debug)
                {
                    java.lang.SystemJ.outJ.println("executeQuery conn is " + connection.toString());
                }
                return(new TinySQLResultSet(connection.executetinySQL(this), this));
            }
        }