SQL Server數(shù)據(jù)格式修改忘記保存按鈕的破解
文章主要描述的是SQL Server數(shù)據(jù)格式修改之時,沒有對按鈕進行保存的實際情況的破解,如果你現(xiàn)在使用的是 SQL Server 2008數(shù)據(jù)庫, 當(dāng)你對其數(shù)據(jù)結(jié)構(gòu)進行修改之后,保存時會報下圖情況:
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 的一種自我保護,當(dāng)你的修改可能導(dǎo)致數(shù)據(jù)表被刪除并重新創(chuàng)建時(dropped and re-created),就會有這個提醒。
SQL Server數(shù)據(jù)格式修改導(dǎo)致表被重新創(chuàng)建可能是以下幾種情況:
在表中間添加一個新列;
刪除列
更改列為 Null 性
更改列的順序
更改列的數(shù)據(jù)類型
若要不使用這個保護,需要在“工具”菜單中單擊“選項”,展開“設(shè)計器”,然后單擊“表設(shè)計器和數(shù)據(jù)庫設(shè)計器”。 清除“阻止保存要求重新創(chuàng)建表的更改”復(fù)選框。
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.
如下圖:
以上的相關(guān)內(nèi)容就是對SQL Server數(shù)據(jù)格式修改的介紹,望你能有所收獲。
【編輯推薦】