arnaud,
The data in an updatable SqlCeResultSet gets flushed to the database when
you call Update, Insert or Delete. Since a SqlCeResultSet is associated with
a SqlCeConnection, I don't see any reason why the operations on a resultset
shouldn't be able to participate in transactions associated with the
connection, but I can't say that I've actually tested it.
As far as best practices, I tend to create SqlCeResultSets as needed rather
than keeping one around for the lifetime of an app, but it's probabably just
a matter of style. The main thing you want to avoid is using any single
connection on more than one thread at a time.

Signature
Ginny Caughey
Device Application Development MVP
> Hello,
>
[quoted text clipped - 10 lines]
> regards,
> arnaud
ag - 17 Jul 2008 13:34 GMT
Ginny,
Thanks for your help.
The application inserts a few rows every seconds in different tables on a
slow platform. To avoid creating each time a new Resulset, we create all the
ResultSets at start up and retreive them as needed via a Hashtable.
I would like to be able to commit a single Insert or a group of inserts. If
data is flushed when I call Insert, how could I commit my inserts with a
transaction ?
I guess I could create each time an sqlcommand "INSERT..." with a
transaction, but this would be slower.
regards,
arnaud.
> arnaud,
>
[quoted text clipped - 23 lines]
> > regards,
> > arnaud
Laxmi Narsimha Rao Oruganti [MSFT] - 18 Jul 2008 06:52 GMT
I guess SqlCeResultSet can be done inside a transaction. Both
SqlCeDataReader and SqlCeResultSet assume the SqlCeCommand.Transaction as
their transaction. Did you make sure to set SqlCeCommand.Transaction
correctly. Note that, by default SqlCeConnection.CreateCommand does not
enlist into SqlCeConnection.Transaction. You need to explicitly set that.
Please let us know if things are working after the above said changes.
Thanks,
Laxmi
> Ginny,
>
[quoted text clipped - 47 lines]
>> > regards,
>> > arnaud