diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index 6828f66..ac0877e 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
155 | MySqlCommand result = | 155 | MySqlCommand result = |
156 | new MySqlCommand("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", | 156 | new MySqlCommand("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", |
157 | database.Connection); | 157 | database.Connection); |
158 | result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); | 158 | result.Parameters.AddWithValue("?uuid", folderID.ToString()); |
159 | MySqlDataReader reader = result.ExecuteReader(); | 159 | MySqlDataReader reader = result.ExecuteReader(); |
160 | 160 | ||
161 | while (reader.Read()) | 161 | while (reader.Read()) |
@@ -190,8 +190,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
190 | new MySqlCommand( | 190 | new MySqlCommand( |
191 | "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", | 191 | "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", |
192 | database.Connection); | 192 | database.Connection); |
193 | result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); | 193 | result.Parameters.AddWithValue("?uuid", user.ToString()); |
194 | result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); | 194 | result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); |
195 | MySqlDataReader reader = result.ExecuteReader(); | 195 | MySqlDataReader reader = result.ExecuteReader(); |
196 | 196 | ||
197 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); | 197 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); |
@@ -224,8 +224,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
224 | new MySqlCommand( | 224 | new MySqlCommand( |
225 | "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", | 225 | "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", |
226 | database.Connection); | 226 | database.Connection); |
227 | result.Parameters.AddWithValue("?uuid", user.ToStringHyphenated()); | 227 | result.Parameters.AddWithValue("?uuid", user.ToString()); |
228 | result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToStringHyphenated()); | 228 | result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); |
229 | 229 | ||
230 | MySqlDataReader reader = result.ExecuteReader(); | 230 | MySqlDataReader reader = result.ExecuteReader(); |
231 | 231 | ||
@@ -275,7 +275,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
275 | MySqlCommand result = | 275 | MySqlCommand result = |
276 | new MySqlCommand("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", | 276 | new MySqlCommand("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", |
277 | database.Connection); | 277 | database.Connection); |
278 | result.Parameters.AddWithValue("?uuid", parentID.ToStringHyphenated()); | 278 | result.Parameters.AddWithValue("?uuid", parentID.ToString()); |
279 | MySqlDataReader reader = result.ExecuteReader(); | 279 | MySqlDataReader reader = result.ExecuteReader(); |
280 | 280 | ||
281 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); | 281 | List<InventoryFolderBase> items = new List<InventoryFolderBase>(); |
@@ -346,7 +346,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
346 | 346 | ||
347 | MySqlCommand result = | 347 | MySqlCommand result = |
348 | new MySqlCommand("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", database.Connection); | 348 | new MySqlCommand("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", database.Connection); |
349 | result.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); | 349 | result.Parameters.AddWithValue("?uuid", itemID.ToString()); |
350 | MySqlDataReader reader = result.ExecuteReader(); | 350 | MySqlDataReader reader = result.ExecuteReader(); |
351 | 351 | ||
352 | InventoryItemBase item = null; | 352 | InventoryItemBase item = null; |
@@ -407,7 +407,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
407 | { | 407 | { |
408 | MySqlCommand result = | 408 | MySqlCommand result = |
409 | new MySqlCommand("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", database.Connection); | 409 | new MySqlCommand("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", database.Connection); |
410 | result.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); | 410 | result.Parameters.AddWithValue("?uuid", folderID.ToString()); |
411 | MySqlDataReader reader = result.ExecuteReader(); | 411 | MySqlDataReader reader = result.ExecuteReader(); |
412 | 412 | ||
413 | reader.Read(); | 413 | reader.Read(); |
@@ -440,18 +440,18 @@ namespace OpenSim.Framework.Data.MySQL | |||
440 | try | 440 | try |
441 | { | 441 | { |
442 | MySqlCommand result = new MySqlCommand(sql, database.Connection); | 442 | MySqlCommand result = new MySqlCommand(sql, database.Connection); |
443 | result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToStringHyphenated()); | 443 | result.Parameters.AddWithValue("?inventoryID", item.inventoryID.ToString()); |
444 | result.Parameters.AddWithValue("?assetID", item.assetID.ToStringHyphenated()); | 444 | result.Parameters.AddWithValue("?assetID", item.assetID.ToString()); |
445 | result.Parameters.AddWithValue("?assetType", item.assetType.ToString()); | 445 | result.Parameters.AddWithValue("?assetType", item.assetType.ToString()); |
446 | result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToStringHyphenated()); | 446 | result.Parameters.AddWithValue("?parentFolderID", item.parentFolderID.ToString()); |
447 | result.Parameters.AddWithValue("?avatarID", item.avatarID.ToStringHyphenated()); | 447 | result.Parameters.AddWithValue("?avatarID", item.avatarID.ToString()); |
448 | result.Parameters.AddWithValue("?inventoryName", item.inventoryName); | 448 | result.Parameters.AddWithValue("?inventoryName", item.inventoryName); |
449 | result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription); | 449 | result.Parameters.AddWithValue("?inventoryDescription", item.inventoryDescription); |
450 | result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString()); | 450 | result.Parameters.AddWithValue("?inventoryNextPermissions", item.inventoryNextPermissions.ToString()); |
451 | result.Parameters.AddWithValue("?inventoryCurrentPermissions", | 451 | result.Parameters.AddWithValue("?inventoryCurrentPermissions", |
452 | item.inventoryCurrentPermissions.ToString()); | 452 | item.inventoryCurrentPermissions.ToString()); |
453 | result.Parameters.AddWithValue("?invType", item.invType); | 453 | result.Parameters.AddWithValue("?invType", item.invType); |
454 | result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToStringHyphenated()); | 454 | result.Parameters.AddWithValue("?creatorID", item.creatorsID.ToString()); |
455 | result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions); | 455 | result.Parameters.AddWithValue("?inventoryBasePermissions", item.inventoryBasePermissions); |
456 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); | 456 | result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.inventoryEveryOnePermissions); |
457 | result.ExecuteNonQuery(); | 457 | result.ExecuteNonQuery(); |
@@ -482,7 +482,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
482 | { | 482 | { |
483 | MySqlCommand cmd = | 483 | MySqlCommand cmd = |
484 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); | 484 | new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection); |
485 | cmd.Parameters.AddWithValue("?uuid", itemID.ToStringHyphenated()); | 485 | cmd.Parameters.AddWithValue("?uuid", itemID.ToString()); |
486 | cmd.ExecuteNonQuery(); | 486 | cmd.ExecuteNonQuery(); |
487 | } | 487 | } |
488 | catch (MySqlException e) | 488 | catch (MySqlException e) |
@@ -503,9 +503,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
503 | sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; | 503 | sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; |
504 | 504 | ||
505 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); | 505 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); |
506 | cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); | 506 | cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); |
507 | cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToStringHyphenated()); | 507 | cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToString()); |
508 | cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); | 508 | cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); |
509 | cmd.Parameters.AddWithValue("?folderName", folder.name); | 509 | cmd.Parameters.AddWithValue("?folderName", folder.name); |
510 | cmd.Parameters.AddWithValue("?type", (short) folder.type); | 510 | cmd.Parameters.AddWithValue("?type", (short) folder.type); |
511 | cmd.Parameters.AddWithValue("?version", folder.version); | 511 | cmd.Parameters.AddWithValue("?version", folder.version); |
@@ -538,8 +538,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
538 | "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; | 538 | "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; |
539 | 539 | ||
540 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); | 540 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); |
541 | cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); | 541 | cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); |
542 | cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); | 542 | cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); |
543 | 543 | ||
544 | 544 | ||
545 | try | 545 | try |
@@ -587,7 +587,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
587 | { | 587 | { |
588 | MySqlCommand cmd = | 588 | MySqlCommand cmd = |
589 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); | 589 | new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection); |
590 | cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); | 590 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
591 | cmd.ExecuteNonQuery(); | 591 | cmd.ExecuteNonQuery(); |
592 | } | 592 | } |
593 | catch (MySqlException e) | 593 | catch (MySqlException e) |
@@ -603,7 +603,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
603 | { | 603 | { |
604 | MySqlCommand cmd = | 604 | MySqlCommand cmd = |
605 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); | 605 | new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection); |
606 | cmd.Parameters.AddWithValue("?uuid", folderID.ToStringHyphenated()); | 606 | cmd.Parameters.AddWithValue("?uuid", folderID.ToString()); |
607 | cmd.ExecuteNonQuery(); | 607 | cmd.ExecuteNonQuery(); |
608 | } | 608 | } |
609 | catch (MySqlException e) | 609 | catch (MySqlException e) |