aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLManager.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLManager.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs
index c687c89..d60c444 100644
--- a/OpenSim/Data/MSSQL/MSSQLManager.cs
+++ b/OpenSim/Data/MSSQL/MSSQLManager.cs
@@ -102,6 +102,7 @@ namespace OpenSim.Data.MSSQL
102 /// </summary> 102 /// </summary>
103 /// <param name="dt"></param> 103 /// <param name="dt"></param>
104 /// <returns></returns> 104 /// <returns></returns>
105/*
105 [Obsolete("Do not use!")] 106 [Obsolete("Do not use!")]
106 protected static string defineTable(DataTable dt) 107 protected static string defineTable(DataTable dt)
107 { 108 {
@@ -125,6 +126,7 @@ namespace OpenSim.Data.MSSQL
125 sql += ")"; 126 sql += ")";
126 return sql; 127 return sql;
127 } 128 }
129*/
128 130
129 #endregion 131 #endregion
130 132
@@ -134,6 +136,7 @@ namespace OpenSim.Data.MSSQL
134 /// <param name="type">a type</param> 136 /// <param name="type">a type</param>
135 /// <returns>a sqltype</returns> 137 /// <returns>a sqltype</returns>
136 /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> 138 /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks>
139/*
137 [Obsolete("Used by a obsolete methods")] 140 [Obsolete("Used by a obsolete methods")]
138 public static string SqlType(Type type) 141 public static string SqlType(Type type)
139 { 142 {
@@ -155,6 +158,7 @@ namespace OpenSim.Data.MSSQL
155 } 158 }
156 return "varchar(255)"; 159 return "varchar(255)";
157 } 160 }
161*/
158 162
159 /// <summary> 163 /// <summary>
160 /// Type conversion to a SQLDbType functions 164 /// Type conversion to a SQLDbType functions
@@ -185,7 +189,7 @@ namespace OpenSim.Data.MSSQL
185 } 189 }
186 if (type == typeof(UUID)) 190 if (type == typeof(UUID))
187 { 191 {
188 return SqlDbType.VarChar; 192 return SqlDbType.UniqueIdentifier;
189 } 193 }
190 if (type == typeof(sbyte)) 194 if (type == typeof(sbyte))
191 { 195 {
@@ -215,13 +219,13 @@ namespace OpenSim.Data.MSSQL
215 { 219 {
216 Type valueType = value.GetType(); 220 Type valueType = value.GetType();
217 221
218 if (valueType == typeof(UUID)) 222 if (valueType == typeof(UUID)) //TODO check if this works
219 { 223 {
220 return value.ToString(); 224 return ((UUID) value).Guid;
221 } 225 }
222 if (valueType == typeof(UUID)) 226 if (valueType == typeof(UUID))
223 { 227 {
224 return value.ToString(); 228 return ((UUID)value).Guid;
225 } 229 }
226 if (valueType == typeof(bool)) 230 if (valueType == typeof(bool))
227 { 231 {