Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2571 for trunk


Ignore:
Timestamp:
12/23/09 13:41:26 (15 years ago)
Author:
mkommend
Message:

corrected reopening of connection if no database exists (ticket #759)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs

    r2534 r2571  
    9191      if (!ctx.DatabaseExists() && !this.ReadOnly)
    9292        ctx.CreateDatabase();
     93      else
     94        ctx.Connection.Open();
    9395    }
    9496
     
    9698      if (ctx == null)
    9799        return;
     100      ctx.Connection.Close();
    98101      ctx.Connection.Dispose();
    99102      ctx.Dispose();
     
    386389      ctx.Models.InsertOnSubmit(m);
    387390      ctx.SubmitChanges();
    388       ctx.ModelData.InsertOnSubmit(new ModelData(m, PersistenceManager.SaveToGZip(model.Predictor)));     
     391      ctx.ModelData.InsertOnSubmit(new ModelData(m, PersistenceManager.SaveToGZip(model.Predictor)));
    389392
    390393      foreach (string variableName in model.Predictor.GetInputVariables())
     
    408411        }
    409412      }
    410      ctx.SubmitChanges();
     413      ctx.SubmitChanges();
    411414    }
    412415  }
Note: See TracChangeset for help on using the changeset viewer.