public TableModel(ResultWrapper rw)
       {
         myRes = rw.getResultSet();
         wrapper = rw;
        try
        {
            if(myRes != null)// dml commands
            {
                int cols = myRes.getMetaData().getColumnCount();
                colSizes = new int[cols + 1];
                String tableName = null;
                for (int i = 1; i <= cols; i++)
                {
                    String currTn = myRes.getMetaData().getTableName(i);

                    if (tableName != null && !tableName.equals(currTn))
                    {
                        moreThanOneTable = true;
                        break;
                    }
                    tableName = currTn;
                }
            }
        }
        catch (SQLException ex)
        {
        }
       }