随笔 - 934, 文章 - 0, 评论 - 247, 阅读 - 344万

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

SQL Server 数据格式修改时,没有保存按钮的情况解决

Posted on   蝈蝈俊  阅读(397)  评论(1编辑  收藏  举报

如果你使用的是 SQL Server 2008, 当你修改数据结构后,保存时会报下图情况:

image

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.

这是 SQL Server 2008 的一种自我保护,当你的修改可能导致数据表被删除并重新创建时(dropped and re-created),就会有这个提醒。

导致表被重新创建可能是以下几种情况:

  • 在表中间添加一个新列;
  • 删除列
  • 更改列为 Null 性
  • 更改列的顺序
  • 更改列的数据类型

若要不使用这个保护,需要在“工具”菜单中单击“选项”,展开“设计器”,然后单击“表设计器和数据库设计器”。 清除“阻止保存要求重新创建表的更改”复选框。

on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

如下图:

image

参考资料:

Save (Not Permitted) Dialog Box
http://msdn.microsoft.com/en-us/library/bb895146.aspx

编辑推荐:
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
阅读排行:
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
点击右上角即可分享
微信分享提示