Hi, I need help for the next methods (first(),last(),absolute())because dont work and send me this error in
import java.sql.*;
public class Query {
public static void main(
String[] args) {
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
}
catch (Exception e) {
System.err.println("Driver Error...");
e.printStackTrace();
}
try {
String cadCon="jdbc:mysql://127.0.0.1/xxx";
Connection conexion = DriverManager.getConnection(cadCon,"xx ","xx");
Statement sentencia = conexion.createStatement();
String consulta="SELECT * FROM bajas";
ResultSet srs = sentencia.executeQuery(consulta);
srs.absolute(4); //here send me Error
int rowNum = srs.getRow(); // rowNum should be 4
srs.relative(-3);
int rowNum2 = srs.getRow(); // rowNum should be 1
srs.relative(2);
int rowNum3 = srs.getRow(); // rowNum should be 3
System.out.println("one "+rowNum+"two"+rowNum2+"three"+rowNum3);
and then i got the error
java.lang.AbstractMethodError
at Consulta.main(Consulta.java:26)
Exception in
thread "main"
the method srs.next() work it, so I dont know what I have to do? thank for your help.