aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MSSQL
diff options
context:
space:
mode:
authorBrian McBee2007-12-15 04:57:14 +0000
committerBrian McBee2007-12-15 04:57:14 +0000
commit8a8c89a0f32b528bd588715bdbfc875c852e7187 (patch)
treeb46cb20d03dfdb21a5cbdfa514a8e745070a3713 /OpenSim/Framework/Data.MSSQL
parentSet svn:eol-style. Cleaned up set-eol-style.sh a bit. (diff)
downloadopensim-SC-8a8c89a0f32b528bd588715bdbfc875c852e7187.zip
opensim-SC-8a8c89a0f32b528bd588715bdbfc875c852e7187.tar.gz
opensim-SC-8a8c89a0f32b528bd588715bdbfc875c852e7187.tar.bz2
opensim-SC-8a8c89a0f32b528bd588715bdbfc875c852e7187.tar.xz
Grid Inventory feature upgrade: renaming folders should now be correct, subfolders work, moving folders works.
Tested only in MYSQL, but may work in MSSQL and sqlite. Probably not working in standalone mode.
Diffstat (limited to 'OpenSim/Framework/Data.MSSQL')
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
index ef2a0f3..69b53a3 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
@@ -604,6 +604,34 @@ namespace OpenSim.Framework.Data.MSSQL
604 604
605 } 605 }
606 606
607 /// <summary>
608 /// Updates an inventory folder
609 /// </summary>
610 /// <param name="folder">Folder to update</param>
611
612 public void moveInventoryFolder(InventoryFolderBase folder)
613 {
614 SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
615 "parentFolderID = @parentFolderID," +
616 "folderID = @keyFolderID;", database.getConnection());
617 SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToStringHyphenated());
618 SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToStringHyphenated());
619 SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToStringHyphenated());
620 command.Parameters.Add(param1);
621 command.Parameters.Add(param2);
622 command.Parameters.Add(param3);
623
624 try
625 {
626 command.ExecuteNonQuery();
627 }
628 catch (Exception e)
629 {
630 MainLog.Instance.Error(e.ToString());
631 }
632
633
634 }
607 635
608 /// <summary> 636 /// <summary>
609 /// Append a list of all the child folders of a parent folder 637 /// Append a list of all the child folders of a parent folder