I am using the SQL Server 2000 Driver for JDBC BETA 2
and when I use last() method of a ResultSet I get:
'java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Unsupported
method: ResultSet.last'
The documentation says this method is supported.
Does anybody know why is this happening please?
Thanks a lot!
Pavel
The ResultSet.last() method works fine with beta2 driver.
We have tested the issue and have no problems. If you need further help,
send me your code. I will be glad to help you.
Sridhar Paladugu
Microsoft Developer Support
JDBC Webdata
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order
your FREE Security Tool Kit, please visit
<http://www.microsoft.com/security>.
Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
Connection con = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://localhost:1433;databasename=test;user=sa;passwor
d=sa" );
Statement st = con.createStatement();
String sql = "SELECT id FROM person where username='" +
request.getParameter( "uname" ) + "' AND password='" +
request.getParameter( "md5pwd" ) + "'";
System.out.println( sql );
ResultSet rs = st.executeQuery( sql );
Anything wrong with what i'm doing ?
Thanks.
.cg
"Sridhar Paladugu[CompCon tech]" <sr...@online.microsoft.com> wrote in
message news:c02KxhluBHA.1516@cpmsftngxa08...
"Sridhar Paladugu[CompCon tech]" <sr...@online.microsoft.com> wrote in
message news:c02KxhluBHA.1516@cpmsftngxa08...
if(con!=null){
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
ResultSet rs = stmt.executeQuery("select * from update_test");
if(rs!=null){
rs.last();
System.out.println(rs.getInt("id"));
}else System.out.println("No Active Connection");
first and last now work and i dont get Invalid Descriptor Index anymore. The
only thing different is the createStatement call .. I was using it with no
args.
Thanks agin,
Cathal
"Sridhar Paladugu[CompCon tech]" <sr...@online.microsoft.com> wrote in
message news:uVVm$6uuBHA.1988@cpmsftngxa07...