Rs.getString("UrlPath")与这个Rs.getString(1)的区别是什么呢
解决方案 »
- JSP问题 求解
- JSP页面错误,提示不支持的属性或者方法!!急!
- 一个奇怪的乱码问题?
- 问个很简单的问题,如何得到当前的年份 在线等中
- 哪种JSP编译器好?
- jsp中如何在今天的日期基础上,加上一个月,在线等待!!
- struts中在资源配置文件中编译好的中文无法显示在页面上
- jsp中的update该怎么做呢!是不是字符集问题
- 关于Ant ivy build.xml报错
- tomcat7用startup.bat启动应用程序能读取到网络共享文件,但当服务启动时却不行?
- double one = Double.parseDouble(firstNumber);报错了,为什么?
- one-to-many 取值问题
Rs.getString(1) 这个是取第一列的值。
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. Parameters:
columnName the SQL name of the column
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException if a database access error occurs***********************************************************************************************String java.sql.ResultSet.getString(int columnIndex) throws SQLException
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
SQLException if a database access error occurs
与这个Rs.getString(1),1是在你数据库中第一个字段的值,
如果你只是显式查看一列而数据库没有的话,你用这个不是方便吗?