* Deal with a situation where the new fields in the inventory store are null on sqlite

* This is due to a preparatory change I made yesterday
0.6.0-stable
Justin Clarke Casey 2008-04-30 16:41:05 +00:00
parent f3b44deeee
commit eac3fd51f0
1 changed files with 18 additions and 6 deletions

View File

@ -103,12 +103,24 @@ namespace OpenSim.Data.SQLite
item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]); item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]);
// new fields // new fields
if (!Convert.IsDBNull(row["salePrice"]))
item.SalePrice = Convert.ToInt32(row["salePrice"]); item.SalePrice = Convert.ToInt32(row["salePrice"]);
if (!Convert.IsDBNull(row["saleType"]))
item.SaleType = Convert.ToByte(row["saleType"]); item.SaleType = Convert.ToByte(row["saleType"]);
if (!Convert.IsDBNull(row["creationDate"]))
item.CreationDate = Convert.ToInt32(row["creationDate"]); item.CreationDate = Convert.ToInt32(row["creationDate"]);
if (!Convert.IsDBNull(row["groupID"]))
item.GroupID = new LLUUID((string)row["groupID"]); item.GroupID = new LLUUID((string)row["groupID"]);
if (!Convert.IsDBNull(row["groupOwned"]))
item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); item.GroupOwned = Convert.ToBoolean(row["groupOwned"]);
if (!Convert.IsDBNull(row["Flags"]))
item.Flags = Convert.ToUInt32(row["Flags"]); item.Flags = Convert.ToUInt32(row["Flags"]);
return item; return item;
} }