我想问一下............

HERO2008 2001-09-19 01:09:13
我刚学习jsp
看源程序时看到了这句话:
ResultSetMetaData rsmt=rs.getMetaData();

但是我不明白它是什么意义和作用!

您能告诉我么?
谢谢
...全文
49 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
HERO2008 2001-09-19
  • 打赏
  • 举报
回复
谢谢了!!!
lci21 2001-09-19
  • 打赏
  • 举报
回复
ResultSetMetaData属于java.sql包。

public interface ResultSetMetaData
An object that can be used to get information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs, creates the ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.


ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
boolean b = rsmd.isSearchable(1);

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧