afrisby
parent
dcf41cb683
commit
cb2ae6eaed
|
@ -101,16 +101,20 @@ 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);
|
||||||
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
|
||||||
p.Value = asset.FullID.GetBytes();
|
using (cmd)
|
||||||
cmd.Parameters.AddWithValue("?name", asset.Name);
|
{
|
||||||
cmd.Parameters.AddWithValue("?description", asset.Description);
|
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
|
||||||
cmd.Parameters.AddWithValue("?assetType", asset.Type);
|
p.Value = asset.FullID.GetBytes();
|
||||||
cmd.Parameters.AddWithValue("?invType", asset.InvType);
|
cmd.Parameters.AddWithValue("?name", asset.Name);
|
||||||
cmd.Parameters.AddWithValue("?local", asset.Local);
|
cmd.Parameters.AddWithValue("?description", asset.Description);
|
||||||
cmd.Parameters.AddWithValue("?temporary", asset.Temporary);
|
cmd.Parameters.AddWithValue("?assetType", asset.Type);
|
||||||
cmd.Parameters.AddWithValue("?data", asset.Data);
|
cmd.Parameters.AddWithValue("?invType", asset.InvType);
|
||||||
cmd.ExecuteNonQuery();
|
cmd.Parameters.AddWithValue("?local", asset.Local);
|
||||||
|
cmd.Parameters.AddWithValue("?temporary", asset.Temporary);
|
||||||
|
cmd.Parameters.AddWithValue("?data", asset.Data);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateAsset(AssetBase asset)
|
public void UpdateAsset(AssetBase asset)
|
||||||
|
|
Loading…
Reference in New Issue