SQL Server Compact Edition (SqlCe) 是否有像 Oracle Lite 一样的 SNAPSHOT 表?
在 Oracle Lite 中,您可以创建一个 SNAPSHOT 表,该表与普通表类似,只是它跟踪自身的更改。语法是
CREATE SNAPSHOT TABLE tblWhatever ...
,您可以像普通表一样对其执行 CRUD 操作。要获取更改信息,您可以像这样查询表:
SELECT * FROM tblWhatever + WHERE ...
它返回表中满足 WHERE 子句的所有行(包括已删除的行),并且您可以将每行的 row_state
列作为普通字段访问(这对于普通的 SELECT * FROM tblWhatever WHERE ... 查询是不可见的)。
有没有办法用 Sql Compact Edition (3.5) 做同样的事情 - 即创建一个不使用 RDA 跟踪更改的表?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要回答我自己的问题,它看起来像“是”,只要您有 SqlCe 3.5 SP2:
http:// /blogs.msdn.com/sqlservercompact/
To answer my own question, it looks like "yes", as long as you have SqlCe 3.5 SP2:
http://blogs.msdn.com/sqlservercompact/