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