如果你是用adodb访问的话,我知道可以得到这个值
解决方案 »
- PriorityQueue的问题,请教教我。
- BYTE数组怎样循环赋值给CHAR数组
- 关于JAVA语音技术的一些问题。。。
- 一个逻辑问题。各位帮帮小妹
- 怎么根据JSplitPane左边的内容,比如JTree,在右边动态显示不同的JPanel
- 菜鸟问题,请问jdk和sdk的区别是什么呢?是不是装了jre以后就可以不设置路径呢?
- 哪位大侠用java编写过snmp呢??请给予指点!!!多谢了!!!!
- 帮我解决了,我一定送分的!
- 想自己用java 编辑一个记事本
- 用java怎么分割dat文件
- 如何使用JAVA编写一直运行的后台程序???
- 急!急!急!请大虾指点:我用JBuilder3写了个Applet,单单运行Applet能正常显示,但运行HTML就提示找不到aaa.class,我的codebase路径是通过‘搜索’查出来的,应该没错的,那到底是什么原因?
ResultSet RS = Stmt.executeQuery("select c1,c2 from robber");
java.sql.ResultSetMetaData mm = RS.getMetaData();
System.out.println("The size is:"+mm.getColumnDisplaySize(1)+","+mm.getColumnDisplaySize(2));
String schemaPattern,
String tableNamePattern,
String columnNamePattern) throws SQLExceptionGet a description of table columns available in a catalog.
Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION. Each column description has the following columns: TABLE_CAT String => table catalog (may be null)
TABLE_SCHEM String => table schema (may be null)
TABLE_NAME String => table name
COLUMN_NAME String => column name
DATA_TYPE short => SQL type from java.sql.Types
TYPE_NAME String => Data source dependent type name
COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
BUFFER_LENGTH is not used.
DECIMAL_DIGITS int => the number of fractional digits
NUM_PREC_RADIX int => Radix (typically either 10 or 2)
NULLABLE int => is NULL allowed?
columnNoNulls - might not allow NULL values
columnNullable - definitely allows NULL values
columnNullableUnknown - nullability unknown
REMARKS String => comment describing column (may be null)
COLUMN_DEF String => default value (may be null)
SQL_DATA_TYPE int => unused
SQL_DATETIME_SUB int => unused
CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
ORDINAL_POSITION int => index of column in table (starting at 1)
IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows. Parameters:
catalog - a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern - a schema name pattern; "" retrieves those without a schema
tableNamePattern - a table name pattern
columnNamePattern - a column name pattern
Returns:
ResultSet - each row is a column description
Throws: SQLException
if a database-access error occurs.
int length = rsm getColumnDisplaySize(column);
//column - the first column is 1, the second is 2, ...