From 3e1ca2bd2136a51f23dff0d31f4725b4e05c3f7c Mon Sep 17 00:00:00 2001 From: fernando Date: Tue, 15 Oct 2013 11:55:08 -0500 Subject: * Fixes mantis #6802 Simulator crashes whist loading (lighshare enabled) * Please test --- OpenSim/Data/PGSQL/PGSQLSimulationData.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Data/PGSQL/PGSQLSimulationData.cs') diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs index 5753ae3..69b0beb 100644 --- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs +++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs @@ -727,7 +727,7 @@ namespace OpenSim.Data.PGSQL using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) { - cmd.Parameters.Add(_Database.CreateParameter("regionID", regionUUID)); + cmd.Parameters.Add(_Database.CreateParameter("regionID", regionUUID.ToString() )); conn.Open(); using (NpgsqlDataReader result = cmd.ExecuteReader()) { @@ -817,7 +817,7 @@ namespace OpenSim.Data.PGSQL using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) { conn.Open(); - cmd.Parameters.Add(_Database.CreateParameter("region_id", regionID)); + cmd.Parameters.Add(_Database.CreateParameter("region_id", regionID.ToString())); cmd.ExecuteNonQuery(); } } @@ -831,8 +831,8 @@ namespace OpenSim.Data.PGSQL conn.Open(); using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) { - cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID)); - exists = (int)cmd.ExecuteScalar() > 0; + cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString() )); + exists = cmd.ExecuteNonQuery() > 0; } } if (exists) -- cgit v1.1