Dae Pessoas,
Tem como eu serializar um ResultSet??? (Tentei o ObjectOutputStream, mas nao rola! Pois tem q ser um objeto com interface serializable) (Eu sei q o ResultSet é uma interface!)
Eu to usando jdbc da micosoft!
Ou alguma alternativa para eu obter os resultados de uma maneira “legal” pra eu manipular na otra ponta!???
Sorry for answering in english, I can read a little portugues, but I can’t write it.
Here you will find two technical articles about serializing disconnected recordsets using HTTP and the Hessian web services protocol (a lightweight ws protocol).
[quote=“Cordova”]Sorry for answering in english, I can read a little portugues, but I can’t write it.
Here you will find two technical articles about serializing disconnected recordsets using HTTP and the Hessian web services protocol (a lightweight ws protocol).
Hi Cordova,
I was trying to use your library and i got some problem,
Im using it on a non-J2EE application.
I want just make a SELECT on a table and send it to an applet, so i make a Recordset from my ResultSet with the query results. Then, on the other node(applet), when readObject() as a HashMap,
ObjectInputStream in = new ObjectInputStream( new BufferedInputStream(con.getInputStream(), con.getContentLength()) );
HashMap map = (HashMap)in.readObject();
i got an ClassNotFoundException saying “dinamica.RecordsetField”, just that!! Ive imported dinamica.*;
Thats a part of the server node:
this.rec=new Recordset(rs);
rs.close();
//retrieve hashmap containing all published recordsets
HashMap obj = rec.getFields();
Where rs is a ResultSet!
How can i make an application like that?? It’s possible?!?
How can i solve this problem?
Uma ClassNotFoundException ocorre, claro, em tempo de execução e não de compilação. Tente coloca-la no seu classpath ou entre as libs do seu projeto, se estiver usando uma IDE que deve funcionar.