attempted fix for .NET issue with the database

afrisby
Sean Dague 2007-08-24 12:02:52 +00:00
parent df73446bee
commit c296ad684b
1 changed files with 6 additions and 6 deletions

View File

@ -751,21 +751,21 @@ namespace OpenSim.DataStore.MonoSqliteStorage
private bool TestTables(SqliteConnection conn)
{
SqliteCommand primSelectCmd = new SqliteCommand(primSelect, conn);
SqliteDataAdapter primDa = new SqliteDataAdapter(primSelectCmd);
SqliteDataAdapter pDa = new SqliteDataAdapter(primSelectCmd);
SqliteCommand shapeSelectCmd = new SqliteCommand(shapeSelect, conn);
SqliteDataAdapter shapeDa = new SqliteDataAdapter(shapeSelectCmd);
SqliteDataAdapter sDa = new SqliteDataAdapter(shapeSelectCmd);
DataSet tmpDS = new DataSet();
try {
primDa.Fill(tmpDS, "prims");
shapeDa.Fill(tmpDS, "primshapes");
pDa.Fill(tmpDS, "prims");
sDa.Fill(tmpDS, "primshapes");
} catch (Mono.Data.SqliteClient.SqliteSyntaxException) {
MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating");
InitDB(conn);
}
primDa.Fill(tmpDS, "prims");
shapeDa.Fill(tmpDS, "primshapes");
pDa.Fill(tmpDS, "prims");
sDa.Fill(tmpDS, "primshapes");
foreach (DataColumn col in createPrimTable().Columns) {
if (! tmpDS.Tables["prims"].Columns.Contains(col.ColumnName) ) {