diff options
author | Justin Clarke Casey | 2008-04-30 16:41:05 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-30 16:41:05 +0000 |
commit | eac3fd51f052691e6d0ed899ddeb00b128220928 (patch) | |
tree | 2b92dfc7c6c36e915b1047d1cfb02f33606d6cb6 /OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |
parent | * Trivial sqlite inventory db log message change so I can pick out the messag... (diff) | |
download | opensim-SC-eac3fd51f052691e6d0ed899ddeb00b128220928.zip opensim-SC-eac3fd51f052691e6d0ed899ddeb00b128220928.tar.gz opensim-SC-eac3fd51f052691e6d0ed899ddeb00b128220928.tar.bz2 opensim-SC-eac3fd51f052691e6d0ed899ddeb00b128220928.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 5122167..1c60938 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -103,12 +103,24 @@ namespace OpenSim.Data.SQLite | |||
103 | item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]); | 103 | item.EveryOnePermissions = Convert.ToUInt32(row["inventoryEveryOnePermissions"]); |
104 | 104 | ||
105 | // new fields | 105 | // new fields |
106 | item.SalePrice = Convert.ToInt32(row["salePrice"]); | 106 | if (!Convert.IsDBNull(row["salePrice"])) |
107 | item.SaleType = Convert.ToByte(row["saleType"]); | 107 | item.SalePrice = Convert.ToInt32(row["salePrice"]); |
108 | item.CreationDate = Convert.ToInt32(row["creationDate"]); | 108 | |
109 | item.GroupID = new LLUUID((string)row["groupID"]); | 109 | if (!Convert.IsDBNull(row["saleType"])) |
110 | item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); | 110 | item.SaleType = Convert.ToByte(row["saleType"]); |
111 | item.Flags = Convert.ToUInt32(row["Flags"]); | 111 | |
112 | if (!Convert.IsDBNull(row["creationDate"])) | ||
113 | item.CreationDate = Convert.ToInt32(row["creationDate"]); | ||
114 | |||
115 | if (!Convert.IsDBNull(row["groupID"])) | ||
116 | item.GroupID = new LLUUID((string)row["groupID"]); | ||
117 | |||
118 | if (!Convert.IsDBNull(row["groupOwned"])) | ||
119 | item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); | ||
120 | |||
121 | if (!Convert.IsDBNull(row["Flags"])) | ||
122 | item.Flags = Convert.ToUInt32(row["Flags"]); | ||
123 | |||
112 | return item; | 124 | return item; |
113 | } | 125 | } |
114 | 126 | ||