aspose file tools*
The moose likes Java in General and the fly likes My Data over The network Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "My Data over The network" Watch "My Data over The network" New topic
Author

My Data over The network

omar bili
Ranch Hand

Joined: Aug 13, 2004
Posts: 177
hi ,i need to send a ResultSet using a socket
to the server can collect the data from the database
place it in a ResultSet and then send the ResultSet using a socket.
but the problem is that the ResultSet is not Serializable , so
1 - i created an object
2 - every record in the DB is an instance of
that object
3 - placed these object in a tmp.dat file
4 - transformed the file to an array of bytes
5 - i transmitted this array with the socket

this is working just fine but is there an easier way to
do that !!?
plus the tmp.dat wont contain more than 200,000 object .
is this the limit ?
thx
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Look in this forum for ResultSet to XML or ResultSet to Flat File. There are some solutions discussed there that you could easily adapt to sending strings over sockets.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: My Data over The network