I have created CustomerTbl
in SQL Server 2008.
我在SQL Server 2008中创建了CustomerTbl。
For that i have,
为此,我有,
Right Clicking the Table Folder in ServerExplorer
and selecting Add New Table
.
右键单击ServerExplorer中的表文件夹,然后选择“添加新表”。
1. Now i Have Added three column say CustomerID
, FirstName
, LastName
with datatype int
,varchar(50)
,varchar(50)
respectively.
1.现在我已经添加了三列,分别表示CustomerID,FirstName,LastName,数据类型为int,varchar(50),varchar(50)。
2. Now save the table with CustomerTbl
name.
2.现在使用CustomerTbl名称保存表。
3. now I reopen the Table Defination by RightClicking Table inside ServerExporer
and Selecting OpenTableDefination
.
3.现在我通过在ServerExporer中右键单击表并选择OpenTableDefination重新打开表定义。
4. Now i changing the Property of CustomerID
column. I need to automatically increment the value by One each time new record inserted in table. for that I set IsIdentity property to true. using selecting field and ColumnPropery Tab.
4.现在我更改了CustomerID列的属性。每次在表中插入新记录时,我需要自动将值递增1。为此,我将IsIdentity属性设置为true。使用选择字段和ColumnPropery选项卡。
5. But Problem Occur when i try to save the table. I am getting following error box.
但是当我尝试保存表格时出现问题。我收到以下错误框。
why i can't make any changes in table's fields property after we have created table and saved it once.???
为什么我在创建表并保存一次之后无法对表的fields属性进行任何更改。
Please help....
1 个解决方案
#1
3
It's a setting in SQL Server Managment Studio.
这是SQL Server Managment Studio中的一个设置。
Menu Tools - Options - Designers - Prevent saving changes that require table re-creation
菜单工具 - 选项 - 设计器 - 防止保存需要重新创建表的更改
#1
3
It's a setting in SQL Server Managment Studio.
这是SQL Server Managment Studio中的一个设置。
Menu Tools - Options - Designers - Prevent saving changes that require table re-creation
菜单工具 - 选项 - 设计器 - 防止保存需要重新创建表的更改