afrisby
parent
dcf41cb683
commit
cb2ae6eaed
|
@ -101,6 +101,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
"REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" +
|
"REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" +
|
||||||
"VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)",
|
"VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)",
|
||||||
_dbConnection.Connection);
|
_dbConnection.Connection);
|
||||||
|
|
||||||
|
using (cmd)
|
||||||
|
{
|
||||||
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
||||||
p.Value = asset.FullID.GetBytes();
|
p.Value = asset.FullID.GetBytes();
|
||||||
cmd.Parameters.AddWithValue("?name", asset.Name);
|
cmd.Parameters.AddWithValue("?name", asset.Name);
|
||||||
|
@ -112,6 +115,7 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
cmd.Parameters.AddWithValue("?data", asset.Data);
|
cmd.Parameters.AddWithValue("?data", asset.Data);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateAsset(AssetBase asset)
|
public void UpdateAsset(AssetBase asset)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue