diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLManager.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index b3e9b6e..47d4cbc 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -185,7 +185,7 @@ namespace OpenSim.Data.MSSQL | |||
185 | } | 185 | } |
186 | if (type == typeof(sbyte)) | 186 | if (type == typeof(sbyte)) |
187 | { | 187 | { |
188 | return SqlDbType.TinyInt; | 188 | return SqlDbType.Int; |
189 | } | 189 | } |
190 | if (type == typeof(Byte[])) | 190 | if (type == typeof(Byte[])) |
191 | { | 191 | { |
@@ -215,6 +215,10 @@ namespace OpenSim.Data.MSSQL | |||
215 | { | 215 | { |
216 | return value.ToString(); | 216 | return value.ToString(); |
217 | } | 217 | } |
218 | if (valueType == typeof(OpenMetaverse.UUID)) | ||
219 | { | ||
220 | return value.ToString(); | ||
221 | } | ||
218 | if (valueType == typeof(bool)) | 222 | if (valueType == typeof(bool)) |
219 | { | 223 | { |
220 | return (bool)value ? 1 : 0; | 224 | return (bool)value ? 1 : 0; |
@@ -223,6 +227,10 @@ namespace OpenSim.Data.MSSQL | |||
223 | { | 227 | { |
224 | return value; | 228 | return value; |
225 | } | 229 | } |
230 | if (valueType == typeof(int)) | ||
231 | { | ||
232 | return value; | ||
233 | } | ||
226 | return value; | 234 | return value; |
227 | } | 235 | } |
228 | 236 | ||
@@ -269,6 +277,11 @@ namespace OpenSim.Data.MSSQL | |||
269 | 277 | ||
270 | private static readonly Dictionary<string, string> emptyDictionary = new Dictionary<string, string>(); | 278 | private static readonly Dictionary<string, string> emptyDictionary = new Dictionary<string, string>(); |
271 | 279 | ||
280 | /// <summary> | ||
281 | /// Run a query and return a sql db command | ||
282 | /// </summary> | ||
283 | /// <param name="sql">The SQL query.</param> | ||
284 | /// <returns></returns> | ||
272 | internal AutoClosingSqlCommand Query(string sql) | 285 | internal AutoClosingSqlCommand Query(string sql) |
273 | { | 286 | { |
274 | return Query(sql, emptyDictionary); | 287 | return Query(sql, emptyDictionary); |