Logo Search packages:      
Sourcecode: mysql-connector-java version File versions

int com::mysql::jdbc::ResultSetMetaData::getColumnDisplaySize ( int  column  )  throws SQLException [inline]

What is the column's normal maximum width in characters?

Parameters:
column the first column is 1, the second is 2, etc.
Returns:
the maximum width
Exceptions:
SQLException if a database access error occurs

Definition at line 322 of file ResultSetMetaData.java.

References getField(), com::mysql::jdbc::Field::getLength(), and com::mysql::jdbc::Field::getMaxBytesPerCharacter().

                                                                    {
      Field f = getField(column);
      
        int lengthInBytes = f.getLength();
        
        return lengthInBytes / f.getMaxBytesPerCharacter();
    }


Generated by  Doxygen 1.6.0   Back to index