SQL中的Response.Clear()等价物

时间:2013-03-29 23:12:34

标签: asp.net sql-server tsql

TSQL中是否有与ASP.NET Response.Clear()等效的内容?

在某些情况下,我需要从之前选择的缓冲区中删除结果集。

编辑:

update [ViewCounts] set [SiteViews] += 1  OUTPUT INSERTED.SiteViews 
where  [PageID] = @PageID AND [LastIP] <> @IP


    IF @@ROWCOUNT = 0
    BEGIN

    --- Need to clear the the empty (OUTPUT INSERTED.SiteViews) buffer here, as it crashes the Entity Framework

    select [SiteViews] from [ViewCounts]  where  [PageID] = @PageID

    END

1 个答案:

答案 0 :(得分:0)

您可以使用DBCC DROPCLEANBUFFERS 从缓冲池中删除所有干净缓冲区