Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

My Data over The network

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic