SqlServer : Saving changes is not permitted

With SqlServer, when you want to change the structure of a table, you may encounter the following warning message :

“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.”

warn1

To avoid this warning message, go to the “tools” menu, then click “Options”

toolsoptionsClick on the “Designer” node

Designers

Then uncheck the “Prevent saving changes that require table re-creation” checkbox

uncheck
And you are done, the message box will not appears anymore

Incoming search terms:

  • sqlserver saving changes is not permitted

Get the parent Folder for a SPListItem

To retrieve the parent folder

my extension method


public static SPFolder GetParentFolder(this SPListItem spListItem)

{

if (spListItem == null)

return null;

SPFile spFile = spListItem.Web.GetFile(spListItem.Url);

if (spFile == null)

return null;

return spFile.ParentFolder;

}

Use


SPFolder parentFolder = sPListItem.GetParentFolder();

if (parentFolder != null)

{

// do some stuffs..

}

public static SPFolder GetParentFolder(this SPListItem spListItem)
{
if (spListItem == null)
return null;
SPFile spFile = spListItem.Web.GetFile(spListItem.Url);
if (spFile == null)
return null;
return spFile.ParentFolder;
}[/csharp]

Incoming search terms:

  • splistitem parent folder
  • splistitem get parent folder
  • splistitem get containg spfolder
  • splistitem change folder
  • get parent folder of splistitem
  • SPListItem parentfolder
  • how to get splistitem parent folder
  • get SPListItem parent folder
  • get splistitem folder
  • get parent folder for spitem