diff options
author | lbsa71 | 2008-03-28 14:19:17 +0000 |
---|---|---|
committer | lbsa71 | 2008-03-28 14:19:17 +0000 |
commit | 88a14c9a761d0b7d488990b9c9ab4555b99a949f (patch) | |
tree | d3a1dcce888bb26e663e9bd2ddd4884d4e2d5bcd /OpenSim | |
parent | From: Michael Osias <mosias@us.ibm.com> (diff) | |
download | opensim-SC-88a14c9a761d0b7d488990b9c9ab4555b99a949f.zip opensim-SC-88a14c9a761d0b7d488990b9c9ab4555b99a949f.tar.gz opensim-SC-88a14c9a761d0b7d488990b9c9ab4555b99a949f.tar.bz2 opensim-SC-88a14c9a761d0b7d488990b9c9ab4555b99a949f.tar.xz |
* fixed pk_violation on rename for MSSQLInventoryData
("le fix le plus ugly for le problem trés dumb")
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs index 1e73214..03bde7e 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs | |||
@@ -424,6 +424,12 @@ namespace OpenSim.Framework.Data.MSSQL | |||
424 | /// <param name="item">The inventory item</param> | 424 | /// <param name="item">The inventory item</param> |
425 | public void addInventoryItem(InventoryItemBase item) | 425 | public void addInventoryItem(InventoryItemBase item) |
426 | { | 426 | { |
427 | if (getInventoryItem(item.inventoryID) != null) | ||
428 | { | ||
429 | updateInventoryItem(item); | ||
430 | return; | ||
431 | } | ||
432 | |||
427 | string sql = "INSERT INTO inventoryitems"; | 433 | string sql = "INSERT INTO inventoryitems"; |
428 | sql += | 434 | sql += |
429 | "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES "; | 435 | "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES "; |