0

I want to transfer data between databases over http and thought to use Cachedrowset since its already serialized.

How is the best way to insert a populated CachedRowset object into another database? Is it possible at all?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Hugo Larson
  • 15
  • 1
  • 6
  • As far as I know, row sets are hardly ever used (and the reference implementation is buggy as hell), I'm not sure you'll get a quick answer. But I think you should be looking at [`WebRowSet`](http://docs.oracle.com/javase/8/docs/api/javax/sql/rowset/WebRowSet.html) instead. However, the XML format of a web row set has specific requirements for marking updates, inserts and deletes. It might be easier to use a REST endpoint combined with something like Spring Data JPA if you want to transfer data. – Mark Rotteveel Sep 05 '17 at 07:24
  • Hello Mr Jaybird :) Well it's useful for simple selects and I don't want to mess with JPA and create entity classes for every query. Wanted to push the Cachedrowset into the database without looping through it to transform it to JDBC PreparedStatements. Maybe it cant be done that way. – Hugo Larson Sep 05 '17 at 17:49
  • As I said, `WebRowSet` (which is a `CachedRowSet` with an XML serialization feature) might have support for that, but I think you might have a hard time to get it to work correctly. – Mark Rotteveel Sep 06 '17 at 08:57

0 Answers0