views:

67

answers:

1

In Oracle Lite, you can create a SNAPSHOT table which is like a normal table except that it tracks changes to itself. The syntax is

CREATE SNAPSHOT TABLE tblWhatever ...

and you can perform CRUD operations on it like a normal table. To get the change information, you query the table like this:

SELECT * FROM tblWhatever + WHERE ...

which returns all the rows in the table (including deleted ones) meeting the WHERE clause, and you can access each row's row_state column as a normal field (which is invisible to a normal SELECT * FROM tblWhatever WHERE ... query).

Is there some way to do the same thing with Sql Compact Edition (3.5) - i.e. create a table that tracks changes without using RDA?

A: 

To answer my own question, it looks like "yes", as long as you have SqlCe 3.5 SP2:

http://blogs.msdn.com/sqlservercompact/

MusiGenesis