Added temporary fix for the sqlite datastore exception in windows .Net, Added a Try catch block around "shapeDa.Fill(ds.Tables["primshapes"]);" line. Seems if the database file is empty (ie opensim has just created it or nothing has been stored in it yet.) then the exception will be fired and catch, then opensim can continue and have no problems (it will still save prims fine), then on next restart if the database file has entries in it, the exception will no longer be thrown.

afrisby
MW 2007-08-24 13:35:51 +00:00
parent 39a8cc43c7
commit bbc7b5b847
1 changed files with 11 additions and 2 deletions

View File

@ -57,14 +57,23 @@ namespace OpenSim.DataStore.MonoSqliteStorage
// TODO: see if the linkage actually holds.
// primDa.FillSchema(ds, SchemaType.Source, "PrimSchema");
TestTables(conn);
ds.Tables.Add(createPrimTable());
primDa.Fill(ds.Tables["prims"]);
setupPrimCommands(primDa, conn);
MainLog.Instance.Verbose("DATASTORE", "Populated Prim Definitions");
ds.Tables.Add(createShapeTable());
shapeDa.Fill(ds.Tables["primshapes"]);
try
{
shapeDa.Fill(ds.Tables["primshapes"]);
}
catch (Exception)
{
MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table");
}
setupShapeCommands(shapeDa, conn);
MainLog.Instance.Verbose("DATASTORE", "Populated Prim Shapes");