aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLAssetData.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
index 055cd92..114538d 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
@@ -101,16 +101,20 @@ namespace OpenSim.Framework.Data.MySQL
101 "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" + 101 "REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" +
102 "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)", 102 "VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)",
103 _dbConnection.Connection); 103 _dbConnection.Connection);
104 MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); 104
105 p.Value = asset.FullID.GetBytes(); 105 using (cmd)
106 cmd.Parameters.AddWithValue("?name", asset.Name); 106 {
107 cmd.Parameters.AddWithValue("?description", asset.Description); 107 MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
108 cmd.Parameters.AddWithValue("?assetType", asset.Type); 108 p.Value = asset.FullID.GetBytes();
109 cmd.Parameters.AddWithValue("?invType", asset.InvType); 109 cmd.Parameters.AddWithValue("?name", asset.Name);
110 cmd.Parameters.AddWithValue("?local", asset.Local); 110 cmd.Parameters.AddWithValue("?description", asset.Description);
111 cmd.Parameters.AddWithValue("?temporary", asset.Temporary); 111 cmd.Parameters.AddWithValue("?assetType", asset.Type);
112 cmd.Parameters.AddWithValue("?data", asset.Data); 112 cmd.Parameters.AddWithValue("?invType", asset.InvType);
113 cmd.ExecuteNonQuery(); 113 cmd.Parameters.AddWithValue("?local", asset.Local);
114 cmd.Parameters.AddWithValue("?temporary", asset.Temporary);
115 cmd.Parameters.AddWithValue("?data", asset.Data);
116 cmd.ExecuteNonQuery();
117 }
114 } 118 }
115 119
116 public void UpdateAsset(AssetBase asset) 120 public void UpdateAsset(AssetBase asset)