aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs17
2 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index 1482184..c1eee8d 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -635,9 +635,9 @@ namespace OpenSim.Data.MSSQL
635 /// <param name="connection">connection to the database</param> 635 /// <param name="connection">connection to the database</param>
636 private void DeleteItemsInFolder(UUID folderID, SqlConnection connection) 636 private void DeleteItemsInFolder(UUID folderID, SqlConnection connection)
637 { 637 {
638 using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE folderID=@folderID", connection)) 638 using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", connection))
639 { 639 {
640 command.Parameters.Add(database.CreateParameter("folderID", folderID)); 640 command.Parameters.Add(database.CreateParameter("parentFolderID", folderID));
641 641
642 try 642 try
643 { 643 {
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index 3ef1053..7fe8ed0 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -582,8 +582,21 @@ namespace OpenSim.Data.MSSQL
582 /// <param name="appearance">the appearence</param> 582 /// <param name="appearance">the appearence</param>
583 override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) 583 override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
584 { 584 {
585 string sql = @"DELETE FROM avatarappearance WHERE owner=@owner; 585 string sql = @"DELETE FROM avatarappearance WHERE owner=@owner";
586 INSERT INTO avatarappearance 586 using (AutoClosingSqlCommand cmd = database.Query(sql))
587 {
588 cmd.Parameters.Add(database.CreateParameter("@owner", appearance.Owner));
589 try
590 {
591 cmd.ExecuteNonQuery();
592 }
593 catch (Exception e)
594 {
595 m_log.ErrorFormat("[USER DB] Error deleting old user appearance, error: {0}", e.Message);
596 }
597 }
598
599 sql=@"INSERT INTO avatarappearance
587 (owner, serial, visual_params, texture, avatar_height, 600 (owner, serial, visual_params, texture, avatar_height,
588 body_item, body_asset, skin_item, skin_asset, hair_item, 601 body_item, body_asset, skin_item, skin_asset, hair_item,
589 hair_asset, eyes_item, eyes_asset, shirt_item, shirt_asset, 602 hair_asset, eyes_item, eyes_asset, shirt_item, shirt_asset,