SharePoint 2007:如何在事务中执行一系列操作? [英] SharePoint 2007: How can I perform a series of operations within a transaction?

查看:83
本文介绍了SharePoint 2007:如何在事务中执行一系列操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很想知道如何在事务内的SharePoint上下文中执行一系列操作.例如,我希望能够执行以下操作:

I would love to know how to perform a series of operations in a SharePoint context within a transaction. For example, I would like to be able to do something like the following:

context.BeginTransaction();
listItemA.Update();
listItemB.Update();
context.CommitTransaction();

我知道使用OOTB API不可能做到这一点,但是必须有人想出如何实现这一点.是否可以获取对数据库连接的引用以处理事务?还是其他想法?

I know this isn't possible with the OOTB APIs, but someone has got to have figured out how to accomplish this. Is it possible to get a reference to the database connection in order to handle the transaction? Or any other ideas?

推荐答案

尽管SharePoint从技术上讲使用SQL作为存储支持,但我们不应该将其视为基于数据库的应用程序. SP创建了一个伪文件系统,这就是我们通过API与之交互的文件系统.因此,从开发人员的角度来看,Sharepoint几乎不需要事务.

Although SharePoint technically uses SQL as a storage backing, we're not supposed to treat it like a database-based application. SP creates a faux-filesystem of sorts, which is what we interact with via the API. So from the developer perspective, Sharepoint is pretty much transaction-less.

不幸的是,这几乎就是全部了:)即使思考关于试图直接参与数据库的想法也将导致旧约的痛苦.服装出租,牙齿哭泣和咬牙;)

Unfortunately that's pretty much all there is to it :) Even thinking about trying to get involved with the database directly will result in Old Testament pain. Rending of garments, wailing and gnashing of teeth ;)

这篇关于SharePoint 2007:如何在事务中执行一系列操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆