Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4238428

Wrong number of fields in metadata (& incorr. names, as in #4234318)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.1
    • core-libs



      Name: krT82822 Date: 05/14/99


      orig synopsis: "JDBC-ODBC 1.2001 JDK 1.2.1 - Wrong Number of Fields in meta data getFields"

      The code:

      ResultSet rs = meta_data.getColumns(null, null, table_name, "%");
      ResultSetMetaData rsmd = rs.getMetaData();
      for(int i=1; i<=rsmd.getColumnCount(); i++)
      System.out.println("" + i + ") " + rsmd.getColumnName(i));

      Produces to output:
      1) TABLE_QUALIFIER
      2) TABLE_OWNER
      3) TABLE_NAME
      4) column_name
      5) DATA_TYPE
      6) TYPE_NAME
      7) PRECISION
      8) LENGTH
      9) SCALE
      10) RADIX
      11) NULLABLE
      12) REMARKS

      There should be six more fields in the result set:

      13.COLUMN_DEF
      14.SQL_DATA_TYPE
      15.SQL_DATETIME_SUB
      16.CHAR_OCTET_LENGTH
      17.ORDINAL_POSITION
      18.IS_NULLABLE

      Additionally, the fields that are there are not-named properly, but this has already been reported in bug #4234318.

      I am using a Sybase SQL Anywhere 5.5.03 database.
      (Review ID: 63165)
      ======================================================================

            swhitesunw Seth White (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: