Olá,
estou tendo um problema com um ResultSet que vem de uma tabela de um banco Sybase 8 (Mais antigo que minha vó) quando uso o metodo getFetchSize() da classe ResultSet acontece o seguinte erro abaixo:
Exception in thread “main” java.lang.AbstractMethodError: com.sybase.jdbc.SybResultSet.getFetchSize()I
at importadorsakber.ImportadorSakber.main(ImportadorSakber.java:24)
O codigo do meu metodo main() para testes está abaixo:
public static void main(String[] args) throws ClassNotFoundException, SQLException, IOException {
TXT_manager txt = new TXT_manager("c:\\saida.txt");
con = Conexao.getConnection();
ResultSet res = con.prepareStatement(" SELECT CADCLIENTES.I_COD_CLI,"
+ " CADCLIENTES.C_NOM_CLI FROM CADCLIENTES ORDER BY CADCLIENTES.I_COD_CLI ASC").executeQuery();
res.next();//Necessário dar Next() pois o resultset começa na linha 0.
String texto = ("Cliente: " + res.getString("C_NOM_CLI"));
try {
System.out.println(res.getFetchSize());
//Recuperar dados
while(res.next()) {
texto += (System.getProperty("line.separator"));
texto += ("Cliente: " + res.getString("C_NOM_CLI"));
res.next();
}
} finally {
res.close();
con.close();
txt.escrever(texto);
}
}
Obs.: Esse erro acontece com mais metodos do ResultSet, estou suspeitando de pelo banco ser velho, acontece alguma incompatiblidade
Uso Netbeans 7.1/ Windows XP Pro/ Banco: Sybase 8