SQL Server2012。异常:尝试读取或写入受保护的内存(MS.VS.OLE.Interop) [英] SQL server 2012. Exception: attempted to read or write protected memory (MS.VS.OLE.Interop)

查看:872
本文介绍了SQL Server2012。异常:尝试读取或写入受保护的内存(MS.VS.OLE.Interop)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更是SQL Server 2012的最终用户。当我右键单击表名并选择编辑前200行时,会出现以下情况。我收到此消息:

 调用的目标引发了异常。 (mscorlib)
附加信息:
尝试读取或写入受保护的内存。这通常表明
个其他内存已损坏。 (Microsoft.VisualStudio.OLE.Interop)

如果我再次尝试右键单击,则SQL Server将停止工作并关闭。我仍然可以使用SQL命令来插入或更新数据库。我一直在寻找解决方案,并找到此链接: http://social.msdn.microsoft.com/Forums/vstudio/en-US/42b79da5- 6f1e-4122-a2cb-00def87a1ae2 / microsoftvisualstudiooleinterop尝试读或写保护的内存,这通常是一个?forum = visualstudiogeneral



但这仍然无法帮助我清楚地了解原因或找到解决问题的方法。非常感谢您为解决此问题提供的任何帮助。谢谢。

解决方案

您是否要使用2012年(或更早版本)的SQL Management Studio编辑SQL 2014数据库? / p>

您可以通过对主数据库运行此查询来确定数据库的SQL版本:

  SELECT @@ VERSION 

我遇到了同样的问题,我能够直接通过安装和使用SQL Server Management Studio 2014编辑表(编辑前200名)。即使您的数据库和Management Studio均为2012版,升级Management Studio也不会有问题。


I am more an end-user of SQL Server 2012. When I right click on a table name and select "Edit top 200 rows" menu item. I get this message:

 Exception has been thrown by the target of an invocation. (mscorlib)
 Additional information:
   Attempted to read or write protected memory. This is often an indication that 
   other memory is corrupt. (Microsoft.VisualStudio.OLE.Interop)

If I try to do the right click again, SQL server will stop working and close. I still can use SQL commands to insert or update database. I have been searching around for a solution, and found this link: http://social.msdn.microsoft.com/Forums/vstudio/en-US/42b79da5-6f1e-4122-a2cb-00def87a1ae2/microsoftvisualstudiooleinterop-attempted-to-read-or-write-protected-memory-this-is-often-an?forum=visualstudiogeneral

But it still does not help me to understand clearly the cause or find the solution to the issue. Any help to resolve this problem is highly appreciated. Thanks.

解决方案

Are you attempting to edit a SQL 2014 database with the 2012 version (or earlier) of SQL Management Studio?

You can determine the SQL version of your database by running this query against your master database:

SELECT @@VERSION

I had the same problem and I was able to direct edit tables ('Edit Top 200') by installing and using SQL Server Management Studio 2014. Even if both your DB and Management Studio are version 2012, it might not hurt to upgrade Management Studio.

这篇关于SQL Server2012。异常:尝试读取或写入受保护的内存(MS.VS.OLE.Interop)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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