danielwertheim/SisoDb-Provider — Issue #7: Tested SisoDb.Profiling and got exception during ProfilingUpdateStructureSet
Author: mattiasw2
Created: 2011-12-31 14:44:23+00:00
State: open

I uncommented as follows

```
static void Main(string[] args)
{
//Console.WriteLine("Hi. Goto the Profiling-app and open Program.cs and ensure that you are satisfied with the connection string.");
//Console.ReadKey();
//return;

//********* SQL2008 ***********
var cnInfo = new Sql2008ConnectionInfo(@"sisodb:provider=Sql2008||plain:Data source=.\sqlexpress;initial catalog=SisoDb.ProfilingTesting;integrated security=SSPI;");
var db = new Sql2008DbFactory().CreateDatabase(cnInfo);

//********* SQLCE4 ***********
//var cnInfo = new SqlCe4ConnectionInfo(@"sisodb:provider=SqlCe4||plain:Data source=D:\Temp\SisoDb.Profiling.sdf;");
//var db = new SqlCe4DbFactory().CreateDatabase(cnInfo);

db.EnsureNewDatabase();

ProfilingInserts(db, 1, 5);

InsertCustomers(1, 10000, db);
ProfilingQueries(db, GetAllCustomers);
ProfilingQueries(db, GetAllCustomersAsJson);
ProfilingQueries(db, GetAllCustomersViaIndexesTable);
ProfilingQueries(db, GetAllCustomersAsJsonViaIndexesTable);

ProfilingUpdateStructureSet(db);

Console.WriteLine("---- Done ----");
Console.ReadKey();
}
```

and got

```
SisoDb.Sql2008.dll!SisoDb.Sql2008.Dac.Sql2008DbClient.DeleteWhereIdIsBetween(PineCone.Structures.IStructureId structureIdFrom, PineCone.Structures.IStructureId structureIdTo, PineCone.Structures.Schemas.IStructureSchema structureSchema) Line 109	C#
SisoDb.dll!SisoDb.DbUnitOfWork.UpdateMany(System.Func modifier, System.Linq.Expressions.Expression> expression) Line 144 + 0x7f bytes	C#
>	SisoDb.Profiling.exe!SisoDb.Profiling.Program.ProfilingUpdateStructureSet(SisoDb.ISisoDatabase database) Line 49 + 0xa4 bytes	C#
SisoDb.Profiling.exe!SisoDb.Profiling.Program.Main(string[] args) Line 37 + 0xa bytes	C#
[External Code]

with

{"There is already an open DataReader associated with this Command which must be closed first."}

```