From 01fc0492d07aa3a7476b538ba61c7725e2e85260 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 1 Dec 2008 15:03:57 +0000 Subject: Mantis#2730. Thank you kindly, StrawberryFride for a patch that: MSSQL Fix to accommodate random ParentIDs. uint values now cleanly converted to ints and vice versa to hopefully prevent outofrange exceptions on prim storage. --- OpenSim/Data/MSSQL/MSSQLRegionData.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs index c29f566..c38e950 100644 --- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs @@ -930,7 +930,7 @@ VALUES prim.UUID = new UUID((String)primRow["UUID"]); // explicit conversion of integers is required, which sort // of sucks. No idea if there is a shortcut here or not. - prim.ParentID = Convert.ToUInt32(primRow["ParentID"]); + prim.ParentID = (uint)Convert.ToInt32(primRow["ParentID"]); prim.CreationDate = Convert.ToInt32(primRow["CreationDate"]); prim.Name = (String)primRow["Name"]; // various text fields @@ -1307,7 +1307,7 @@ VALUES { row["UUID"] = prim.UUID.ToString(); row["RegionUUID"] = regionUUID.ToString(); - row["ParentID"] = prim.ParentID; + row["ParentID"] = (int)prim.ParentID; row["CreationDate"] = prim.CreationDate; row["Name"] = prim.Name; row["SceneGroupID"] = sceneGroupID.ToString(); -- cgit v1.1