aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLInventoryData.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs26
1 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index c524fc0..e23178c 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -321,6 +321,13 @@ namespace OpenSim.Data.MSSQL
321 item.Creator = new LLUUID((string) reader["creatorID"]); 321 item.Creator = new LLUUID((string) reader["creatorID"]);
322 item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); 322 item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]);
323 item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); 323 item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]);
324 item.SalePrice = (int) reader["salePrice"];
325 item.SaleType = Convert.ToByte(reader["saleType"]);
326 item.CreationDate = (int) reader["creationDate"];
327 item.GroupID = new LLUUID(reader["groupID"].ToString());
328 item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
329 item.Flags = (uint) reader["flags"];
330
324 return item; 331 return item;
325 } 332 }
326 catch (SqlException e) 333 catch (SqlException e)
@@ -440,10 +447,16 @@ namespace OpenSim.Data.MSSQL
440 447
441 string sql = "INSERT INTO inventoryitems"; 448 string sql = "INSERT INTO inventoryitems";
442 sql += 449 sql +=
443 "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES "; 450 "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName]"
451 + ", [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions]"
452 + ", [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]"
453 + ", [salePrice], [saleType], [creationDate], [groupID], [groupOwned], [flags]) VALUES ";
444 sql += 454 sql +=
445 "(@inventoryID, @assetID, @assetType, @parentFolderID, @avatarID, @inventoryName, @inventoryDescription, @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID, @inventoryBasePermissions, @inventoryEveryOnePermissions);"; 455 "(@inventoryID, @assetID, @assetType, @parentFolderID, @avatarID, @inventoryName, @inventoryDescription"
446 456 + ", @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID"
457 + ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @salePrice, @saleType"
458 + ", @creationDate, @groupID, @groupOwned, @flags);";
459
447 try 460 try
448 { 461 {
449 Dictionary<string, string> param = new Dictionary<string, string>(); 462 Dictionary<string, string> param = new Dictionary<string, string>();
@@ -460,6 +473,13 @@ namespace OpenSim.Data.MSSQL
460 param["creatorID"] = item.Creator.ToString(); 473 param["creatorID"] = item.Creator.ToString();
461 param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions); 474 param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions);
462 param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions); 475 param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions);
476
477 param["salePrice"] = Convert.ToString(item.SalePrice);
478 param["saleType"] = Convert.ToString(item.SaleType);
479 param["creationDate"] = Convert.ToString(item.CreationDate);
480 param["groupID"] = item.GroupID.ToString();
481 param["groupOwned"] = Convert.ToString(item.GroupOwned);
482 param["flags"] = Convert.ToString(item.Flags);
463 483
464 IDbCommand result = database.Query(sql, param); 484 IDbCommand result = database.Query(sql, param);
465 result.ExecuteNonQuery(); 485 result.ExecuteNonQuery();