2

Response.Clear()TSQL 中是否有与 ASP.NET 等价的东西?

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

编辑:

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
4

1 回答 1

0

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

于 2013-03-30T14:45:04.037 回答