From 0f9918f1d3df19e4feeb6a742de376aebe4d6f2f Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 7 Jan 2009 15:03:41 +0000 Subject: Thank you kindly, StrawberryFride for a patch that: Solves the problem of unable to load prim items on region start in MSSQL. The error was in the MSSQLRegionData code that loads objects from the database, due to reliance on the ParentID field that is not used. --- OpenSim/Data/MSSQL/MSSQLManager.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Data/MSSQL/MSSQLManager.cs') 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 } if (type == typeof(sbyte)) { - return SqlDbType.TinyInt; + return SqlDbType.Int; } if (type == typeof(Byte[])) { @@ -215,6 +215,10 @@ namespace OpenSim.Data.MSSQL { return value.ToString(); } + if (valueType == typeof(OpenMetaverse.UUID)) + { + return value.ToString(); + } if (valueType == typeof(bool)) { return (bool)value ? 1 : 0; @@ -223,6 +227,10 @@ namespace OpenSim.Data.MSSQL { return value; } + if (valueType == typeof(int)) + { + return value; + } return value; } @@ -269,6 +277,11 @@ namespace OpenSim.Data.MSSQL private static readonly Dictionary emptyDictionary = new Dictionary(); + /// + /// Run a query and return a sql db command + /// + /// The SQL query. + /// internal AutoClosingSqlCommand Query(string sql) { return Query(sql, emptyDictionary); -- cgit v1.1