That didn't work, trying with TableAdapter.FillSchema(DataSet, SchemaType.Source)

ThreadPoolClientBranch
Tedd Hansen 2008-01-19 21:51:16 +00:00
parent 462fc84eb2
commit 056b2940b4
1 changed files with 26 additions and 4 deletions

View File

@ -108,11 +108,13 @@ namespace OpenSim.Framework.Data.MySQL
m_primTable = createPrimTable();
m_dataSet.Tables.Add(m_primTable);
SetupPrimCommands(m_primDataAdapter, m_connection);
m_primDataAdapter.FillSchema(m_primTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
m_primDataAdapter.Fill(m_primTable);
m_shapeTable = createShapeTable();
m_dataSet.Tables.Add(m_shapeTable);
SetupShapeCommands(m_shapeDataAdapter, m_connection);
m_shapeDataAdapter.FillSchema(m_shapeTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
m_shapeDataAdapter.Fill(m_shapeTable);
if (persistPrimInventories)
@ -120,22 +122,26 @@ namespace OpenSim.Framework.Data.MySQL
m_itemsTable = createItemsTable();
m_dataSet.Tables.Add(m_itemsTable);
SetupItemsCommands(m_itemsDataAdapter, m_connection);
m_itemsDataAdapter.FillSchema(m_itemsTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
m_itemsDataAdapter.Fill(m_itemsTable);
}
m_terrainTable = createTerrainTable();
m_dataSet.Tables.Add(m_terrainTable);
SetupTerrainCommands(m_terrainDataAdapter, m_connection);
m_terrainDataAdapter.FillSchema(m_terrainTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
m_terrainDataAdapter.Fill(m_terrainTable);
m_landTable = createLandTable();
m_dataSet.Tables.Add(m_landTable);
setupLandCommands(m_landDataAdapter, m_connection);
m_landDataAdapter.FillSchema(m_landTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
m_landDataAdapter.Fill(m_landTable);
m_landAccessListTable = createLandAccessListTable();
m_dataSet.Tables.Add(m_landAccessListTable);
setupLandAccessCommands(m_landAccessListDataAdapter, m_connection);
m_landAccessListDataAdapter.FillSchema(m_landAccessListTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
m_landAccessListDataAdapter.Fill(m_landAccessListTable);
}
}
@ -1581,14 +1587,22 @@ namespace OpenSim.Framework.Data.MySQL
DataSet tmpDS = new DataSet();
try
{
pDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
pDa.Fill(tmpDS, "prims");
sDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
sDa.Fill(tmpDS, "primshapes");
if (persistPrimInventories)
{
iDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
iDa.Fill(tmpDS, "primitems");
}
tDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
tDa.Fill(tmpDS, "terrain");
lDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
lDa.Fill(tmpDS, "land");
lalDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
lalDa.Fill(tmpDS, "landaccesslist");
}
catch (MySqlException)
@ -1597,14 +1611,22 @@ namespace OpenSim.Framework.Data.MySQL
InitDB(conn);
}
pDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
pDa.Fill(tmpDS, "prims");
sDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
sDa.Fill(tmpDS, "primshapes");
if (persistPrimInventories)
{
iDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
iDa.Fill(tmpDS, "primitems");
}
tDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
tDa.Fill(tmpDS, "terrain");
lDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
lDa.Fill(tmpDS, "land");
lalDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.
lalDa.Fill(tmpDS, "landaccesslist");
foreach (DataColumn col in createPrimTable().Columns)