posted 18 years ago
A disconnected RowSet can be serialized, sent to a client for update, and de-serialized back at the server to synchronize the changes with the database.
I suppose that the RowSet cannot be serialized until it has been disconnected; i.e. the Connection closed. But what happens to the DataSource attribute during serialization? You can have a DataSource object without being connected to the database. (It merely retains the information needed to _get_ an active database Connection).
I suppose it would be convenient for a serialized RowSet to maintain the DataSource information. Then, when the updated RowSet is returned by the remote client, it remembers how to reconnect to the database.
But I see some dangers with allowing the DataSource to be serialized. The client might try to reconnect the RowSet to the database without having the necessary database drivers (or permissions). Of course, the RowSet could simply throw an exception, but this would be kind of ugly.
My guess is that the DataSource is a nonserialized attribute of the RowSet -- and therefore which would have to be reset upon deserialization before updates could be synchronized. Is this indeed the specification?
(I suppose I could write a program to try it out myself, but that would say more about my specific RowSet implementation than about the way it _should_ work.)