Changeset 45 for trunk/Application


Ignore:
Timestamp:
Mar 12, 2012, 10:23:40 AM (13 years ago)
Author:
chronos
Message:
  • Modified: TChronisBase.Active property control Client connection instead of direct call of Client.Connect and Client.Disconnect methods.
Location:
trunk/Application
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Clients/UChronisClientMySQL.pas

    r44 r45  
    4040  SMissingBaseType = 'Missing base typ for %s';
    4141  SUndefinedType = 'Undefinned type %s';
     42  SCantLoadObjectWithoutId = 'Can''t load object without id';
    4243
    4344
     
    6970  Table: string;
    7071begin
     72  if AObject.Id = 0 then raise Exception.Create(SCantLoadObjectWithoutId);
    7173  try
    7274    DbRows := TDbRows.Create;
  • trunk/Application/UApplicationInfo.pas

    r41 r45  
    5050  Name := 'ChronIS';
    5151  Identification := 1;
    52   ReleaseDate := EncodeDate(2012, 3, 9);
     52  ReleaseDate := EncodeDate(2012, 3, 12);
    5353  MajorVersion := 0;
    5454  MinorVersion := 1;
  • trunk/Application/UChronisClient.pas

    r44 r45  
    112112  end;
    113113
    114 
    115114implementation
    116115
     
    251250  NewProxy.Load;
    252251  if NewProxy.Objects.Count > 0 then begin
    253     DbVersion := TObjectProxy(NewProxy.Objects[0]).Properties.Values['Version'];
     252    NewObject := TObjectProxy.Create;
     253    NewObject.Client := Self;
     254    NewObject.SchemaName := Schema;
     255    NewObject.ObjectName := SystemVersionObject;
     256    NewObject.Id := 1;
     257    NewObject.Load;
     258
     259    DbVersion := NewObject.Properties.Values['Version'];
    254260    if Version <> DbVersion then
    255261      raise Exception.Create(Format(SVersionMismatch, [Version, DbVersion]));
  • trunk/Application/UDataTypes.pas

    r42 r45  
    270270    Proxy.ObjectName := PropertyTable;
    271271    Proxy.Condition := 'Id=' + IntToStr(PropertyID);
     272    Proxy.Load;
    272273    ObjectId := StrToInt(TObjectProxy(Proxy.Objects[0]).Properties.Values['Object']);
    273274    PropertyName := TObjectProxy(Proxy.Objects[0]).Properties.Values['ColumnName'];
Note: See TracChangeset for help on using the changeset viewer.