Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/07/09 15:54:15 (15 years ago)
Author:
mkommend
Message:

corrected connect, disconnect and deletedatabase behaviour (ticket #712)

File:
1 edited

Legend:

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

    r2333 r2339  
    4242
    4343    public void EmptyDatabase() {
     44      ctx.Connection.Dispose();
    4445      ctx.DeleteDatabase();
     46      Connect();
    4547      ctx.CreateDatabase();
    4648    }
     
    4951    public void Connect() {
    5052      if (ctx != null)
    51         return;
     53        Disconnect();
    5254
    5355      ctx = new ModelingDataContext(connection);
     
    6466      if (ctx == null)
    6567        return;
     68      ctx.Connection.Dispose();
    6669      ctx.Dispose();
    6770      ctx = null;
Note: See TracChangeset for help on using the changeset viewer.