attempt to resolve Sqlite not working on .NET for terrain

afrisby
Sean Dague 2007-11-14 14:11:45 +00:00
parent 3cb2b5eb66
commit 5a739cc248
1 changed files with 24 additions and 21 deletions

View File

@ -268,9 +268,12 @@ namespace OpenSim.DataStore.MonoSqlite
{
double[,] terret = new double[256,256];
terret.Initialize();
String sql = "select RegionUUID, Revision, Heightfield from terrain" +
" where RegionUUID=:RegionUUID order by Revision desc limit 1";
SqliteCommand cmd = new SqliteCommand("select RegionUUID, Revision, Heightfield from terrain" +
" where RegionUUID=:RegionUUID order by Revision desc limit 1", conn);
using (SqliteCommand cmd = new SqliteCommand(sql))
{
cmd.Connection = conn;
SqliteParameter param = new SqliteParameter();
cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString()));
@ -297,7 +300,7 @@ namespace OpenSim.DataStore.MonoSqlite
MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString());
}
}
return terret;
}