jsp查询Access数据库setFetchDirection问题,在线等!!!!!

hanhongmin 2006-02-23 06:35:23
setFetchDirection
void setFetchDirection(int direction)
throws SQLExceptionGives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object. The default value is ResultSet.FETCH_FORWARD.
Note that this method sets the default fetch direction for result sets generated by this Statement object. Each result set has its own methods for getting and setting its own fetch direction.


Parameters:
direction - the initial direction for processing rows
Throws:
SQLException - if a database access error occurs or the given direction is not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN
Since:
1.2
See Also:
getFetchDirection()
以上是setFetchDirection文档
我在查询数据库时需要一列一列地查,不知道怎么能改指针还是游标位置什么的
rs.beforeFirst();
rs.first();
都不行
不管stmt.setFetchDirection怎样设置总是返回java.sql.SQLException: Result set type is TYPE_FORWARD_ONLY
这是怎么回事?该怎样解决?本人新手..
...全文
135 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
hanhongmin 2006-02-27
  • 打赏
  • 举报
回复
还有没有人来呀?
叫我怎么结帖阿!!
infowain 2006-02-24
  • 打赏
  • 举报
回复
Result set type is TYPE_FORWARD_ONLY
你打开的数据集游标是forward_only的,也就是说,只能顺序fetch的
changechange 2006-02-24
  • 打赏
  • 举报
回复
在 REORDSET.OPEN 的时候有一个游标参数,类似

rs.open("strsql",adodb.connection,2,3)

hanhongmin 2006-02-24
  • 打赏
  • 举报
回复
...不明白
我以前用vb可以呀,现在想改成jsp的

81,122

社区成员

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

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