invalid cursor state

Hai All

srcSmt=srcCon.prepareStatement("select * from main_info, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

srcRst=srcSmt.executeQuery();

There is no records in the table "main_info", but the srcRst.next() method return true? . and it shows "invalid cursor state error" .Why i got this error?.

Advance wishes !!!!

Message was edited by:

Daiesh

[433 byte] By [Daiesha] at [2007-11-27 11:45:01]
# 1

correct me if I'm wrong but your select statement and resultset.type_scroll_insensitive are one.

srcSmt=srcCon.prepareStatement("select * from main_info, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

srcRst=srcSmt.executeQuery();

should be.

srcSmt=srcCon.prepareStatement("select * from main_info", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

srcRst=srcSmt.executeQuery();

Yannixa at 2007-7-29 17:59:23 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...