squashing further warnings.

0.6.0-stable
Dr Scofield 2008-07-18 10:57:18 +00:00
parent 3fb0a08619
commit 0171e76246
3 changed files with 21 additions and 21 deletions

View File

@ -166,7 +166,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd = m_connection.CreateCommand();
cmd.CommandText = sql;
cmd.Parameters.Add("?RegionID", regionID.ToString());
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
IDataReader r = cmd.ExecuteReader();
@ -209,13 +209,13 @@ namespace OpenSim.Data.MySQL
if(m_FieldMap[name].GetValue(es) is bool)
{
if((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.Add("?"+name, "1");
cmd.Parameters.AddWithValue("?"+name, "1");
else
cmd.Parameters.Add("?"+name, "0");
cmd.Parameters.AddWithValue("?"+name, "0");
}
else
{
cmd.Parameters.Add("?"+name, m_FieldMap[name].GetValue(es).ToString());
cmd.Parameters.AddWithValue("?"+name, m_FieldMap[name].GetValue(es).ToString());
}
}
@ -233,8 +233,8 @@ namespace OpenSim.Data.MySQL
r.Close();
cmd.CommandText = "insert into estate_map values (?RegionID, ?EstateID)";
cmd.Parameters.Add("?RegionID", regionID.ToString());
cmd.Parameters.Add("?EstateID", es.EstateID.ToString());
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
// This will throw on dupe key
try
@ -249,7 +249,7 @@ namespace OpenSim.Data.MySQL
//
cmd.Parameters.Clear();
cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = ?UUID";
cmd.Parameters.Add("?UUID", regionID.ToString());
cmd.Parameters.AddWithValue("?UUID", regionID.ToString());
try
{
@ -283,13 +283,13 @@ namespace OpenSim.Data.MySQL
if(m_FieldMap[name].GetValue(es) is bool)
{
if((bool)m_FieldMap[name].GetValue(es))
cmd.Parameters.Add("?"+name, "1");
cmd.Parameters.AddWithValue("?"+name, "1");
else
cmd.Parameters.Add("?"+name, "0");
cmd.Parameters.AddWithValue("?"+name, "0");
}
else
{
cmd.Parameters.Add("?"+name, m_FieldMap[name].GetValue(es).ToString());
cmd.Parameters.AddWithValue("?"+name, m_FieldMap[name].GetValue(es).ToString());
}
}
@ -310,7 +310,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd = m_connection.CreateCommand();
cmd.CommandText = "select bannedUUID from estateban where EstateID = ?EstateID";
cmd.Parameters.Add("?EstateID", es.EstateID);
cmd.Parameters.AddWithValue("?EstateID", es.EstateID);
IDataReader r = cmd.ExecuteReader();
@ -336,7 +336,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd = m_connection.CreateCommand();
cmd.CommandText = "delete from estateban where EstateID = ?EstateID";
cmd.Parameters.Add("?EstateID", es.EstateID.ToString());
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
cmd.ExecuteNonQuery();
@ -346,8 +346,8 @@ namespace OpenSim.Data.MySQL
foreach(EstateBan b in es.EstateBans)
{
cmd.Parameters.Add("?EstateID", es.EstateID.ToString());
cmd.Parameters.Add("?bannedUUID", b.bannedUUID.ToString());
cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString());
cmd.Parameters.AddWithValue("?bannedUUID", b.bannedUUID.ToString());
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
@ -361,7 +361,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd = m_connection.CreateCommand();
cmd.CommandText = "delete from "+table+" where EstateID = ?EstateID";
cmd.Parameters.Add("?EstateID", EstateID.ToString());
cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
cmd.ExecuteNonQuery();
@ -371,8 +371,8 @@ namespace OpenSim.Data.MySQL
foreach(LLUUID uuid in data)
{
cmd.Parameters.Add("?EstateID", EstateID.ToString());
cmd.Parameters.Add("?uuid", uuid.ToString());
cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
cmd.Parameters.AddWithValue("?uuid", uuid.ToString());
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
@ -388,13 +388,13 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd = m_connection.CreateCommand();
cmd.CommandText = "select uuid from "+table+" where EstateID = ?EstateID";
cmd.Parameters.Add("?EstateID", EstateID);
cmd.Parameters.AddWithValue("?EstateID", EstateID);
IDataReader r = cmd.ExecuteReader();
while(r.Read())
{
EstateBan eb = new EstateBan();
// EstateBan eb = new EstateBan();
LLUUID uuid = new LLUUID();
LLUUID.TryParse(r["uuid"].ToString(), out uuid);

View File

@ -298,7 +298,7 @@ namespace OpenSim.Data.NHibernate
Terrain t = session.Load(typeof(Terrain), regionID) as Terrain;
return t.Doubles;
}
catch (ObjectNotFoundException e)
catch (ObjectNotFoundException)
{
m_log.Info("No terrain yet");
return null;

View File

@ -318,7 +318,7 @@ namespace OpenSim.Data.MySQL
while(r.Read())
{
EstateBan eb = new EstateBan();
// EstateBan eb = new EstateBan();
LLUUID uuid = new LLUUID();
LLUUID.TryParse(r["uuid"].ToString(), out uuid);