Просмотр исходного кода

Add/edit fields: add support for scale (NUMERIC/DECIMAL) and character set/collation (text types). Also a lot in comparison code which needs to be tested.

Reinier Olislagers 11 лет назад
Родитель
Сommit
bdc9940c6e
15 измененных файлов с 1437 добавлено и 1047 удалено
  1. 66 32
      comparison.pas
  2. 1 1
      copytable.pas
  3. 1 56
      createdb.lfm
  4. 317 327
      createdb.lrs
  5. 11 1
      createdb.pas
  6. 12 7
      main.pas
  7. 83 14
      neweditfield.lfm
  8. 49 30
      neweditfield.lrs
  9. 118 26
      neweditfield.pas
  10. 1 1
      scriptdb.pas
  11. 21 6
      systables.pas
  12. 57 54
      tablemanage.lfm
  13. 481 480
      tablemanage.lrs
  14. 39 8
      tablemanage.pas
  15. 180 4
      turbocommon.pas

+ 66 - 32
comparison.pas

@@ -716,10 +716,10 @@ var
   Line: string;
   ATableName: string;
   AFieldName: string;
-  FieldSize: Integer;
-  FieldType, DefaultValue, Description: string;
-  CFieldType, CDefaultValue, CDescription: string;
-  CFieldSize: Integer;
+  FieldSize, CFieldSize: integer;
+  FieldScale, CFieldScale: integer;
+  FieldType, DefaultValue, Characterset, Collation, Description: string;
+  CFieldType, CDefaultValue, CCharacterset, CCollation, CDescription: string;
   NotNull, CNotNull: Boolean;
 begin
   meLog.Lines.Add('');
@@ -739,14 +739,22 @@ begin
     AFieldName:= Line;
 
     // Read all field properties
-    dmSysTables.GetFieldInfo(FDBIndex, ATableName, AFieldName, FieldType, FieldSize, NotNull, DefaultValue, Description);
-    dmSysTables.GetFieldInfo(cbComparedDatabase.ItemIndex, ATableName, AFieldName, CFieldType, CFieldSize, CNotNull,
-      CDefaultValue, CDescription);
+    dmSysTables.GetFieldInfo(FDBIndex, ATableName, AFieldName,
+      FieldType, FieldSize, FieldScale, NotNull,
+      DefaultValue, CharacterSet, Collation, Description);
+    dmSysTables.GetFieldInfo(cbComparedDatabase.ItemIndex, ATableName, AFieldName,
+      CFieldType, CFieldSize, CFieldScale, CNotNull,
+      CDefaultValue, CCharacterSet, CCollation, CDescription);
 
     // Compare
-    if (FieldType <> CFieldType) or ((FieldSize <> CFieldSize) and (not cxIgnoreLength.Checked)) or
-      (NotNull <> CNotNull) or (DefaultValue <> CDefaultValue)
-      or (Description <> CDescription) then
+    if (FieldType <> CFieldType) or
+      ((FieldSize <> CFieldSize) and (not cxIgnoreLength.Checked)) or
+      ((FieldScale <> CFieldScale) and (not cxIgnoreLength.Checked)) or
+      (NotNull <> CNotNull) or
+      (Characterset <> CCharacterset) or
+      (Collation <> CCollation) or
+      (DefaultValue <> CDefaultValue) or
+      (Description <> CDescription) then
       begin
         meLog.Lines.Add(' ' + FExistFieldsList[i]);
         FModifiedFieldsList.Add(FExistFieldsList[i]);
@@ -1196,14 +1204,13 @@ begin
 end;
 
 procedure TfmComparison.ScriptMissingFields;
-
 var
   i: Integer;
   ATableName, AFieldName: string;
   Line: string;
-  FieldSize: Integer;
+  FieldSize, FieldScale: Integer;
   NotNull: Boolean;
-  DefaultValue, Description: string;
+  DefaultValue, Characterset, Collation, Description: string;
   FieldType: string;
   TableSpaces: Integer;
   FieldSpaces: Integer;
@@ -1220,23 +1227,37 @@ begin
     ATableName:= copy(Line, 1, Pos(',', Line) - 1);
     System.Delete(Line, 1, Pos(',', Line));
     AFieldName:= Line;
-    dmSysTables.GetFieldInfo(FDBIndex, ATableName, AFieldName, FieldType, FieldSize, NotNull, DefaultValue, Description);
+    dmSysTables.GetFieldInfo(FDBIndex, ATableName, AFieldName,
+      FieldType, FieldSize, FieldScale, NotNull,
+      DefaultValue, CharacterSet, Collation, Description);
 
     // Script new field
     Line:= FieldType;
-    if Pos('CHAR', Line) > 0 then
-      Line:= Line + '(' + IntToStr(FieldSize) + ')';
-
+    if (Pos('CHAR', Line) > 0) or (Pos('CSTRING', Line) > 0) then
+      Line:= Line + '(' + IntToStr(FieldSize) + ')'
+    else if (Pos('DECIMAL', Line) > 0) or (Pos('NUMERIC', Line) > 0) then
+      Line:= Line + '(' +
+        IntToStr(FieldSize) + ',' +
+        IntToStr(FieldScale) + ')';
 
     // Default value
-    if Trim(DefaultValue) <> '' then
+    if trim(DefaultValue) <> '' then
     begin
-      if (Pos('CHAR', FieldType) > 0) and (Pos('''', DefaultValue) = 0) then
+      if ((Pos('CHAR', FieldType) > 0) or (Pos('CSTRING', FieldType) > 0)) and
+        (Pos('''', DefaultValue) = 0) then
         DefaultValue:= ' ''' + DefaultValue + '''';
       if Pos('default', LowerCase(DefaultValue)) = 0 then
         DefaultValue:= ' default ' + DefaultValue;
       Line:= Line + ' ' + DefaultValue;
+    end;
 
+    // Character set/collation for string type fields
+    if (Pos('CHAR', Line) > 0) or (Pos('CSTRING', Line) > 0) then
+    begin
+      if (Characterset<>'') then
+        Line:= Line + ' character set ' + Characterset;
+      if (Collation<>'') then
+        Line:= Line + ' collation ' + Collation;
     end;
 
     // Null/Not null
@@ -1253,9 +1274,7 @@ begin
 
     FQueryWindow.meQuery.Lines.Add('ALTER TABLE ' + ATableName + Space(TableSpaces) +
       ' ADD ' + AFieldName + Space(FieldSpaces) + ' ' + Line + ';');
-
   end;
-
 end;
 
 procedure TfmComparison.ScriptModifiedFields;
@@ -1263,12 +1282,12 @@ var
   i: Integer;
   ATableName, AFieldName: string;
   Line: string;
-  FieldType, DefaultValue, Description: string;
-  FieldSize: Integer;
-  CFieldType, CDefaultValue, CDescription: string;
-  CFieldSize: Integer;
+  FieldType, DefaultValue, Characterset, Collation, Description: string;
+  cFieldType, cDefaultValue, cCharacterset, cCollation, cDescription: string;
+  FieldSize, cFieldSize: integer;
+  FieldScale, cFieldScale: integer;
   NullFlag: string;
-  NotNull, CNotNull: Boolean;
+  NotNull, cNotNull: Boolean;
   ScriptList: TStringList;
 begin
   if FModifiedFieldsList.Count > 0 then
@@ -1287,9 +1306,13 @@ begin
       System.Delete(Line, 1, Pos(',', Line));
       AFieldName:= Line;
 
-      dmSysTables.GetFieldInfo(FDBIndex, ATableName, AFieldName, FieldType, FieldSize, NotNull, DefaultValue, Description);
-      dmSysTables.GetFieldInfo(cbComparedDatabase.ItemIndex, ATableName, AFieldName, CFieldType, CFieldSize, CNotNull,
-        cDefaultValue, cDescription);
+      //todo: (high priority) test comparison with and without collations, character set, numeric, decimal datatype with scale change
+      dmSysTables.GetFieldInfo(FDBIndex, ATableName,
+        AFieldName, FieldType, FieldSize, FieldScale, NotNull,
+        DefaultValue, Characterset, Collation, Description);
+      dmSysTables.GetFieldInfo(cbComparedDatabase.ItemIndex, ATableName,
+        AFieldName, CFieldType, CFieldSize, CFieldScale, CNotNull,
+        cDefaultValue, cCharacterset, cCollation, cDescription);
 
       ScriptList.Clear;
       // check type/size change
@@ -1297,8 +1320,14 @@ begin
       begin
         Line:= 'ALTER TABLE ' + ATableName + ' ALTER ' + AFieldName + ' TYPE ' + FieldType;
 
-        if Pos('CHAR', FieldType) > 0 then
-          Line:= Line + '(' + IntToStr(FieldSize) + ')';
+        if (Pos('CHAR', FieldType) > 0) or
+           (FieldType = 'CSTRING') then
+          Line:= Line + '(' + IntToStr(FieldSize) + ')'
+        else if (FieldType = 'DECIMAL') or
+           (FieldType = 'NUMERIC') then
+          Line:= Line + '(' +
+            IntToStr(FieldSize) + ',' +
+            IntToStr(FieldScale) + ')';
         Line:= Line + ';';
         ScriptList.Add(Line);
       end;
@@ -1322,6 +1351,12 @@ begin
         ScriptList.Add('and RDB$RELATION_NAME = ''' + ATableName + ''';');
       end;
 
+      // todo: Collation/character set changes: find a way to perform these
+      if Characterset <> cCharacterset then
+        ScriptList.Add('-- WARNING: Character set changed from '+Characterset+' to '+cCharacterset+'. Please update manually.');
+      if Collation <> cCollation then
+        ScriptList.Add('-- WARNING: Collation changed from '+Collation+' to '+cCollation+'. Please update manually.');
+
       // Default value
       if DefaultValue <> cDefaultValue then
       begin
@@ -1332,7 +1367,6 @@ begin
       FQueryWindow.meQuery.Lines.Add('');
       FQueryWindow.meQuery.Lines.Add('-- ' + AFieldName + ' on ' + ATableName);
       FQueryWindow.meQuery.Lines.AddStrings(ScriptList);
-
     end;
   finally
     ScriptList.Free;

+ 1 - 1
copytable.pas

@@ -175,7 +175,7 @@ var
   i: Integer;
   Count: Integer;
 begin
-  dmSysTables.sqQuery.Close; //todo: (low priority) is this really necessary?
+  dmSysTables.sqQuery.Close; //todo: (low priority) is clsoing sqquery really necessary?
   FSourceIndex:= SourceIndex;
   laSourceDatabase.Caption:= fmMain.RegisteredDatabases[SourceIndex].RegRec.Title;
   cbDestDatabase.Clear;

+ 1 - 56
createdb.lfm

@@ -8,6 +8,7 @@ object fmCreateDB: TfmCreateDB
   ClientHeight = 267
   ClientWidth = 481
   Color = clWhite
+  OnCreate = FormCreate
   Position = poScreenCenter
   LCLVersion = '1.2.2.0'
   object Label1: TLabel
@@ -179,63 +180,7 @@ object fmCreateDB: TfmCreateDB
     Top = 170
     Width = 124
     ItemHeight = 13
-    ItemIndex = 42
-    Items.Strings = (
-      'NONE'
-      'TRIM'
-      'ASCII'
-      'BIG_5'
-      'CP943C'
-      'CYRL'
-      'DOS437'
-      'DOS737'
-      'DOS775'
-      'DOS850'
-      'DOS852'
-      'DOS857'
-      'DOS858'
-      'DOS860'
-      'DOS861'
-      'DOS862'
-      'DOS863'
-      'DOS864'
-      'DOS865'
-      'DOS866'
-      'DOS869'
-      'EUCJ_0208'
-      'GBK'
-      'GB_2312'
-      'ISO8859_1'
-      'ISO8859_13'
-      'ISO8859_2'
-      'ISO8859_3'
-      'ISO8859_4'
-      'ISO8859_5'
-      'ISO8859_6'
-      'ISO8859_7'
-      'ISO8859_8'
-      'ISO8859_9'
-      'KOI8R'
-      'KOI8U'
-      'KSC_5601'
-      'NEXT'
-      'OCTETS'
-      'SJIS_0208'
-      'TIS620'
-      'UNICODE_FSS'
-      'UTF8'
-      'WIN1250'
-      'WIN1251'
-      'WIN1252'
-      'WIN1253'
-      'WIN1254'
-      'WIN1255'
-      'WIN1256'
-      'WIN1257'
-      'WIN1258'
-    )
     TabOrder = 6
-    Text = 'UTF8'
   end
   object Image1: TImage
     Left = 384

+ 317 - 327
createdb.lrs

@@ -4,25 +4,26 @@ LazarusResources.Add('TfmCreateDB','FORMDATA',[
   'TPF0'#11'TfmCreateDB'#10'fmCreateDB'#4'Left'#3#151#1#6'Height'#3#11#1#3'Top'
   +#3#201#0#5'Width'#3#225#1#13'ActiveControl'#7#8'btBrowse'#7'Caption'#6#28'Cr'
   +'eate new Firebird Database'#12'ClientHeight'#3#11#1#11'ClientWidth'#3#225#1
-  +#5'Color'#7#7'clWhite'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'1'
-  +'.2.2.0'#0#6'TLabel'#6'Label1'#4'Left'#2#11#6'Height'#2#13#3'Top'#2'%'#5'Wid'
-  +'th'#2'R'#7'Caption'#6#15'Server:Database'#11'ParentColor'#8#0#0#6'TLabel'#6
-  +'Label2'#4'Left'#2#11#6'Height'#2#13#3'Top'#2'X'#5'Width'#2'3'#7'Caption'#6#9
-  +'User name'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2#11#6'Height'
-  +#2#13#3'Top'#3#136#0#5'Width'#2'.'#7'Caption'#6#8'Password'#11'ParentColor'#8
-  +#0#0#6'TLabel'#6'Label4'#4'Left'#2#11#6'Height'#2#13#3'Top'#3#174#0#5'Width'
-  +#2'&'#7'Caption'#6#7'Charset'#11'ParentColor'#8#0#0#5'TEdit'#13'edNewDatabas'
-  +'e'#4'Left'#3#128#0#6'Height'#2#21#3'Top'#2'#'#5'Width'#3#248#0#8'TabOrder'#2
-  +#0#0#0#7'TButton'#8'btBrowse'#4'Left'#3'}'#1#6'Height'#2#25#3'Top'#2'"'#5'Wi'
-  +'dth'#2#27#7'Caption'#6#3'...'#7'OnClick'#7#13'btBrowseClick'#8'TabOrder'#2#1
-  +#0#0#5'TEdit'#10'edUserName'#4'Left'#2'W'#6'Height'#2#21#3'Top'#2'Q'#5'Width'
-  +#3#129#0#8'TabOrder'#2#2#0#0#5'TEdit'#10'edPassword'#4'Left'#2'W'#6'Height'#2
-  +#21#3'Top'#3#128#0#5'Width'#3#129#0#8'EchoMode'#7#10'emPassword'#12'Password'
-  +'Char'#6#1'-'#8'TabOrder'#2#3#0#0#7'TBitBtn'#8'bbCreate'#4'Left'#2#11#6'Heig'
-  +'ht'#2'#'#3'Top'#3#215#0#5'Width'#2'`'#7'Caption'#6#6'Create'#5'Color'#4#219
-  +#242#247#0#7'Default'#9#10'Glyph.Data'#10':'#9#0#0'6'#9#0#0'BM6'#9#0#0#0#0#0
-  +#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0' '#0#0#0#0#0#0#9#0#0'd'#0#0#0'd'#0
-  +#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+  +#5'Color'#7#7'clWhite'#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScree'
+  +'nCenter'#10'LCLVersion'#6#7'1.2.2.0'#0#6'TLabel'#6'Label1'#4'Left'#2#11#6'H'
+  +'eight'#2#13#3'Top'#2'%'#5'Width'#2'R'#7'Caption'#6#15'Server:Database'#11'P'
+  +'arentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#11#6'Height'#2#13#3'Top'#2
+  +'X'#5'Width'#2'3'#7'Caption'#6#9'User name'#11'ParentColor'#8#0#0#6'TLabel'#6
+  +'Label3'#4'Left'#2#11#6'Height'#2#13#3'Top'#3#136#0#5'Width'#2'.'#7'Caption'
+  +#6#8'Password'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2#11#6'Heig'
+  +'ht'#2#13#3'Top'#3#174#0#5'Width'#2'&'#7'Caption'#6#7'Charset'#11'ParentColo'
+  +'r'#8#0#0#5'TEdit'#13'edNewDatabase'#4'Left'#3#128#0#6'Height'#2#21#3'Top'#2
+  +'#'#5'Width'#3#248#0#8'TabOrder'#2#0#0#0#7'TButton'#8'btBrowse'#4'Left'#3'}'
+  +#1#6'Height'#2#25#3'Top'#2'"'#5'Width'#2#27#7'Caption'#6#3'...'#7'OnClick'#7
+  +#13'btBrowseClick'#8'TabOrder'#2#1#0#0#5'TEdit'#10'edUserName'#4'Left'#2'W'#6
+  +'Height'#2#21#3'Top'#2'Q'#5'Width'#3#129#0#8'TabOrder'#2#2#0#0#5'TEdit'#10'e'
+  +'dPassword'#4'Left'#2'W'#6'Height'#2#21#3'Top'#3#128#0#5'Width'#3#129#0#8'Ec'
+  +'hoMode'#7#10'emPassword'#12'PasswordChar'#6#1'-'#8'TabOrder'#2#3#0#0#7'TBit'
+  +'Btn'#8'bbCreate'#4'Left'#2#11#6'Height'#2'#'#3'Top'#3#215#0#5'Width'#2'`'#7
+  +'Caption'#6#6'Create'#5'Color'#4#219#242#247#0#7'Default'#9#10'Glyph.Data'#10
+  +':'#9#0#0'6'#9#0#0'BM6'#9#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#24#0#0#0#24#0#0#0#1#0
+  +' '#0#0#0#0#0#0#9#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255
+  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
@@ -32,88 +33,88 @@ LazarusResources.Add('TfmCreateDB','FORMDATA',[
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#0'I$'#7#0#0#0#1#255#255
+  +#0#0#0#1#0'I$'#7#0#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#21'\2$%'#133'C'#227
-  +#29'c0P'#0#0#0#2#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+  +#255#0#0#0#0#1#21'\2$%'#133'C'#227#29'c0P'#0#0#0#2#255#255#255#0#255#255#255
+  +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#23'Q.'#22'"'#139'K'
-  +#224''''#147'M'#255'('#138'E'#244#26'\,:'#0#0#0#1#255#255#255#0#255#255#255#0
+  +#255#255#255#0#23'Q.'#22'"'#139'K'#224''''#147'M'#255'('#138'E'#244#26'\,:'#0
+  +#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#18'I$'#14#31
-  +#141'S'#211'$'#155'X'#255'&'#151'R'#255''''#147'M'#255''''#134'C'#236#27'W(&'
-  +#0#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
-  +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0'M3'#10
-  +#27#144'Y'#197'!'#163'b'#255'#'#159']'#255'$'#155'W'#255'&'#150'Q'#255''''
-  +#146'L'#255'&'#130'@'#224#23'F#'#22#255#255#255#0#255#255#255#0#255#255#255#0
+  +#255#0#255#255#255#0#18'I$'#14#31#141'S'#211'$'#155'X'#255'&'#151'R'#255''''
+  +#147'M'#255''''#134'C'#236#27'W(&'#0#0#0#1#255#255#255#0#255#255#255#0#255
+  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+  +#255#255#255#0#255#255#255#0#0'M3'#10#27#144'Y'#197'!'#163'b'#255'#'#159']'
+  +#255'$'#155'W'#255'&'#150'Q'#255''''#146'L'#255'&'#130'@'#224#23'F#'#22#255
+  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+  +#255#255#255#0#255#255#255#0#0#0#0#1#12']F'#22#26#154'e'#209#31#171'm'#255' '
+  +#166'g'#255'"'#162'b'#255'#'#158'\'#255'%'#154'V'#255'&'#150'Q'#255'('#146'K'
+  +#255'%|='#209#21'@'#21#12#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+  +#255#255#255#0#255#255#255#0#0#0#0#1#13'rQ&'#24#166'r'#224#28#178'w'#255#29
+  +#174'r'#255#31#170'l'#255' '#166'g'#255'"'#161'_'#251'#'#158'['#255'%'#153'V'
+  +#255'&'#149'P'#255'('#145'J'#255'#w;'#190#0#0#0#4#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#12
-  +']F'#22#26#154'e'#209#31#171'm'#255' '#166'g'#255'"'#162'b'#255'#'#158'\'#255
-  +'%'#154'V'#255'&'#150'Q'#255'('#146'K'#255'%|='#209#21'@'#21#12#255#255#255#0
+  +#255#255#0#255#255#255#0#0#0#0#1#14#132'`8'#23#178#128#236#25#186#130#255#27
+  +#182'|'#255#28#178'w'#255#30#174'q'#255#30#164'h'#246#20'jCA'#31#144'U'#215
+  +'$'#157'Z'#255'%'#153'U'#255''''#149'O'#255'('#145'I'#255'"q6'#165#0#0#0#4
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#13
-  +'rQ&'#24#166'r'#224#28#178'w'#255#29#174'r'#255#31#170'l'#255' '#166'g'#255
-  +'"'#161'_'#251'#'#158'['#255'%'#153'V'#255'&'#149'P'#255'('#145'J'#255'#w;'
-  +#190#0#0#0#4#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#14#132
-  +'`8'#23#178#128#236#25#186#130#255#27#182'|'#255#28#178'w'#255#30#174'q'#255
-  +#30#164'h'#246#20'jCA'#31#144'U'#215'$'#157'Z'#255'%'#153'U'#255''''#149'O'
-  +#255'('#145'I'#255'"q6'#165#0#0#0#4#255#255#255#0#255#255#255#0#255#255#255#0
+  ,#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#15#145'lf'#21#191#139#252#24
+  +#190#135#255#25#185#129#255#27#181'{'#255#28#176'v'#253#21'}P`'#0#0#0#2#18'a'
+  +'>'#29' '#149'X'#232'$'#156'Z'#255'%'#152'T'#255''''#148'N'#255'('#144'I'#255
+  +'!m4'#141#0#0#0#3#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#2#14#143'ik'#22
+  +#190#139#252#24#189#134#255#26#185#128#255#21#142'_'#147#0#0#0#3#255#255#255
+  +#0#0#0#0#1#20'l@4"'#153'Z'#243'$'#156'Y'#255'&'#152'S'#255''''#148'N'#255')'
+  +#143'H'#255'!m3'#145#0#0#0#3#255#255#255#0#255#255#255#0#255#255#255#0#255
+  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#2#14
+  +#143'ik'#22#190#138#252#20#159'q'#192#0#0#0#4#255#255#255#0#255#255#255#0#255
+  +#255#255#0#0#0#0#1#23'qDO#'#156']'#250'$'#155'X'#255'&'#151'R'#255''''#147'M'
+  +#255')'#143'G'#255'!n4'#153#0#0#0#3#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0
-  ,#1#15#145'lf'#21#191#139#252#24#190#135#255#25#185#129#255#27#181'{'#255#28
-  +#176'v'#253#21'}P`'#0#0#0#2#18'a>'#29' '#149'X'#232'$'#156'Z'#255'%'#152'T'
-  +#255''''#148'N'#255'('#144'I'#255'!m4'#141#0#0#0#3#255#255#255#0#255#255#255
-  +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#0#0#0#2#14#143'ik'#22#190#139#252#24#189#134#255#26#185#128#255#21
-  +#142'_'#147#0#0#0#3#255#255#255#0#0#0#0#1#20'l@4"'#153'Z'#243'$'#156'Y'#255
-  +'&'#152'S'#255''''#148'N'#255')'#143'H'#255'!m3'#145#0#0#0#3#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#255#255#255#0#0#0#0#2#14#143'ik'#22#190#138#252#20#159'q'#192#0#0
-  +#0#4#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#23'qDO#'#156']'#250'$'
-  +#155'X'#255'&'#151'R'#255''''#147'M'#255')'#143'G'#255'!n4'#153#0#0#0#3#255
+  +#2#14#142'hX'#17'fD'#15#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+  +#0#255#255#255#0#0#0#0#2#25'wJo#'#159'\'#254'$'#155'W'#255'&'#150'R'#255''''
+  +#146'L'#255')'#142'F'#255'!n4'#162#0#0#0#4#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#255#255#255#0#0#0#0#2#14#142'hX'#17'fD'#15#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#2#25'wJo#'#159
-  +'\'#254'$'#155'W'#255'&'#150'R'#255''''#146'L'#255')'#142'F'#255'!n4'#162#0#0
-  +#0#4#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#255#255#255#0#255#255#255
-  +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0
-  +#0#3#26'~M'#146'#'#158'\'#255'%'#154'V'#255'&'#150'Q'#255'('#146'K'#255')'
-  +#142'E'#255'#o5'#170#0#0#0#4#255#255#255#0#255#255#255#0#255#255#255#0#255
+  +#255#0#0#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+  +#255#255#0#255#255#255#0#255#255#255#0#0#0#0#3#26'~M'#146'#'#158'\'#255'%'
+  +#154'V'#255'&'#150'Q'#255'('#146'K'#255')'#142'E'#255'#o5'#170#0#0#0#4#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
-  +#255#255#255#0#255#255#255#0#0#0#0#4#28#135'Q'#180'#'#158'['#255'%'#154'V'
-  +#255'&'#149'P'#255'('#145'J'#255')'#141'E'#255'$q4'#178#0'+'#0#6#255#255#255
+  +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0
+  +#4#28#135'Q'#180'#'#158'['#255'%'#154'V'#255'&'#149'P'#255'('#145'J'#255')'
+  +#141'E'#255'$q4'#178#0'+'#0#6#255#255#255#0#255#255#255#0#255#255#255#0#255
+  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+  +#255#255#255#0#255#255#255#0#0'9'#28#9#30#141'T'#206'$'#157'['#255'%'#153'U'
+  +#255''''#149'O'#255'('#145'J'#255'*'#141'D'#255'$r4'#185#0'$'#0#7#255#255#255
   +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0'9'#28#9#30
-  +#141'T'#206'$'#157'['#255'%'#153'U'#255''''#149'O'#255'('#145'J'#255'*'#141
-  +'D'#255'$r4'#185#0'$'#0#7#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#12'U1'#21#31
+  +#147'W'#224'$'#156'Z'#255'%'#152'T'#255''''#148'N'#255'('#144'I'#255'*'#140
+  +'C'#255'$q3'#170#0#0#0#2#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#255#255#255#0#12'U1'#21#31#147'W'#224'$'#156'Z'#255'%'#152'T'#255
-  +''''#148'N'#255'('#144'I'#255'*'#140'C'#255'$q3'#170#0#0#0#2#255#255#255#0
+  +#255#255#0#0#0#0#1#19'f@(!'#152'Z'#238'$'#156'Y'#255'&'#152'S'#255''''#148'N'
+  +#255'&'#136'D'#239#28'^+6'#0#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#19'f@(!'#152'Z'#238
-  +'$'#156'Y'#255'&'#152'S'#255''''#148'N'#255'&'#136'D'#239#28'^+6'#0#0#0#1#255
+  +#255#0#255#255#255#0#255#255#255#0#0#0#0#1#23'lBB"'#156'\'#247'$'#155'X'#255
+  +'$'#143'N'#239#28'a37'#0#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0
-  +#1#23'lBB"'#156'\'#247'$'#155'X'#255'$'#143'N'#239#28'a37'#0#0#0#1#255#255
-  +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#0#0#0#2#24'uH`!'#150'X'#236#23'f87'#0#0#0#1#255#255#255
+  +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#2#24'uH`!'#150
+  +'X'#236#23'f87'#0#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
   +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
-  +#255#255#255#0#255#255#255#0#255#255#255#0#0#0#0#1#17'U3'#15#0#0#0#1#255#255
+  +#0#0#0#1#17'U3'#15#0#0#0#1#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
@@ -122,254 +123,243 @@ LazarusResources.Add('TfmCreateDB','FORMDATA',[
   +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
   +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
   +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
-  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
-  +#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#13'bbCreateClick'#8'TabOrder'
-  +#2#4#0#0#7'TBitBtn'#8'bbCancel'#4'Left'#2'x'#6'Height'#2'#'#3'Top'#3#215#0#5
-  +'Width'#2'['#6'Cancel'#9#7'Caption'#6#6'Cancel'#5'Color'#4#219#242#247#0#4'K'
-  +'ind'#7#8'bkCancel'#11'ModalResult'#2#2#8'TabOrder'#2#5#0#0#9'TComboBox'#9'c'
-  +'bCharset'#4'Left'#2'W'#6'Height'#2#21#3'Top'#3#170#0#5'Width'#2'|'#10'ItemH'
-  +'eight'#2#13#9'ItemIndex'#2'*'#13'Items.Strings'#1#6#4'NONE'#6#4'TRIM'#6#5'A'
-  ,'SCII'#6#5'BIG_5'#6#6'CP943C'#6#4'CYRL'#6#6'DOS437'#6#6'DOS737'#6#6'DOS775'#6
-  +#6'DOS850'#6#6'DOS852'#6#6'DOS857'#6#6'DOS858'#6#6'DOS860'#6#6'DOS861'#6#6'D'
-  +'OS862'#6#6'DOS863'#6#6'DOS864'#6#6'DOS865'#6#6'DOS866'#6#6'DOS869'#6#9'EUCJ'
-  +'_0208'#6#3'GBK'#6#7'GB_2312'#6#9'ISO8859_1'#6#10'ISO8859_13'#6#9'ISO8859_2'
-  +#6#9'ISO8859_3'#6#9'ISO8859_4'#6#9'ISO8859_5'#6#9'ISO8859_6'#6#9'ISO8859_7'#6
-  +#9'ISO8859_8'#6#9'ISO8859_9'#6#5'KOI8R'#6#5'KOI8U'#6#8'KSC_5601'#6#4'NEXT'#6
-  +#6'OCTETS'#6#9'SJIS_0208'#6#6'TIS620'#6#11'UNICODE_FSS'#6#4'UTF8'#6#7'WIN125'
-  +'0'#6#7'WIN1251'#6#7'WIN1252'#6#7'WIN1253'#6#7'WIN1254'#6#7'WIN1255'#6#7'WIN'
-  +'1256'#6#7'WIN1257'#6#7'WIN1258'#0#8'TabOrder'#2#6#4'Text'#6#4'UTF8'#0#0#6'T'
-  +'Image'#6'Image1'#4'Left'#3#128#1#6'Height'#2'L'#3'Top'#2'`'#5'Width'#2'O'#12
-  +'Picture.Data'#10'@'#21#0#0#23'TPortableNetworkGraphic$'#21#0#0#137'PNG'#13
-  +#10#26#10#0#0#0#13'IHDR'#0#0#0'H'#0#0#0'H'#8#6#0#0#0'U'#237#179'G'#0#0#20#235
-  +'IDATx'#218#237#156#9'XT'#229#26#128#167#220'+'#181#204#140'L'#19#211#220#208
-  +'L'#201#18#175'&j.h '#179#207#0'*'#162#162#178'(("'#224#2#200#170#162#8#178
-  +');'#178'*'#184'A'#2'"'#251#142#8#130#162#130#128#2#226#138#213#189#215#178
-  +#216#190#251'}'#135#193#192#132'X'#6#141#231#185'='#207#223#204#156#145#249
-  +#255#243#158'o'#255#254'sX'#0#192#250#255'h{'#252#31'Bo'#0't:'#234#244#244
-  +#147#225#161'za'#167#130'=C'#194#2'c'#131#130#252'}N'#156#240#222#234#239#239
-  +'%'#143#223#191#213#235#1#225#127'o'#253#221#200#204#204'\'#150#150#145#146
-  +#155#148#26#255'(>9'#238#215#184#248#232#250#152#184#168#198#168#232's'#16'y'
-  +#225#12#156#139#138#128'3'#231#195'!'#226#236'I'#8'?'#19#10'''#B '#244'T'#16
-  +#132#156'<'#1#129#193#254#141#254#129'>'#245#190'~'#158#191'y'#249#30#127'|'
-  +#220#203'='#223#195#199#141#211#206'|o7'#191#127#163#128#154#23'aaa'#241#246
-  +#171'FQQ'#225#146#171#5#185'y'#217#151#211#235#19'S/A|R,'#196'%DCl'#252#5'@8'
-  +'p!'#246'<t'#4'PPh'#0#156#8#246#131#128'@'#31#240';'#225#13'>'#254#158#224
-  +#237'{'#12'<'#142#187#212'{'#31's'#188'a'#127#208'^$'''#199#239#175#168#168
-  +#216#247#150#21#127#225',Y9'#153#241#227#149#6#240#249#252'>'#184#190#230#241
-  +#246'k'#3#212#18#10'-'#130#22#214'<'#10#138#10#20#139'n'#22#228#230#23'\'#174
-  +'K'#203'J'#134#148#244#4'HJ'#187#4#9')qR'#1#228#27#224#5#30#158#30#224#233
-  +#237#129#128#220#224#134#171'.DZo'#2'k'#27#219'zO'''#219#226'_]'#4#207#253
-  +#214','#242#28'8p'#146#236#166'%sFTY/w'#26'4h'#234'hYY'#197#129']'#145#168'.'
-  +#195'!'#24#218#218#218#253#16'P'#127'%%'#165#1'999'#147'JJoV'#231#230'gAfN*'
-  +#164'g''Cjf'#146#212#1'Ey'#218'B'#161#139#30#28#217'o'#13#135#15';'#192#243
-  +'cjP'#235'!'#2'+'#189#13#144'b'#167#5'u'#174#28#184'f'#169#218'0'#127#254#202
-  +'-'#15'l'#149'.'#215'9-'#7#246'W'#242'F'#239#190'+'''#211#4'I'#238'='#22'K'
-  +#177'o'#143#0'"8$1'#242#242#242#253#8#10#190#31#164#172#172#252'NYY'#201#201
-  +'k7'#243'!''/'#3#178'r'#211#165#14#136#224#248#250'{3'#227#162#235'n'#168#245
-  +'Z'#13'w'#28'WA'#232#222'M'#12#156'Zw'#1#252#225#202'c'#224#212#185#168'B'
-  +#173#179#10#148#217'(C'#221#145#229'P'#231#184#12#180#20#190#14#214#253#238
-  +#171#229'U'#230#243#163#211#245#230#248#176'X'#227'?'#234#168'4uZr'#228#181
-  +#229#251'ijj'#14'\'#181'j'#213#187'***'#131#203#239#150'^+'#184'~'#5'r'#175
-  +'f'#245#8#160#224#176#0#200#246'1'#135'd'#231'm'#224#226'`'#11#17#14#198'P'
-  +#235#169#1#181#18#201'!8'#181'n'#127#194#169';'#170#2'uN?'#188#128'Swx'#9#20
-  +#153#206#127#250#204'~'#225#175#245#7#21#193'O0+'#163#127#255#169#147'Y,'#198
-  +'>'#189'%5@'#140'ZY('#246'%'#169'!0'#170#170#170#239'WV'#150#223')('#186#2'y'
-  +#5'9='#8#232#4#164#187#155'@'#173#183'&<;'#182#10#158#184#180#134'S'#247'7p'
-  +#234#14'}'#15'u'#14#11#129#224#212#239#255#14#12#230#205'H'#158'3n'#230#194
-  +','#189'Yk'#163'5g'#162''''#148'm'#215'6uJ'#181#148#244#149#6#16#28'|?'#172
-  +#248#246#173#227#197#165'E'#144#127#237'r'#143#0#10#11#15'A'#143#229#11#222
-  +'~'#158#16#228#184#143'Q'#171#218#227#237#192'qn'#7#206#129'&8'#245#246's'
-  +#161#210#244#219'g'#191'Y'#205'~^o'#243#13#248'p'#190'<'#199'b'#141#29#211
-  +#158#135#235#168#4#189'E'#6'YY['#249#29'55'#181#15'N'#158#9#154'q'#239'~E#IO'
-  +'O'#1#138#13'8'#2'5'#158#27#225#198#209#141#144'ypc'#219'p'#142#182#3#231'`k'
-  +'8'#245'vs'#160#222'v6'#16#156#223'-'#229#27'f'#141#158#236#136'F'#251#179'n'
-  +#1'j'#182'=d'#148#213#213#149#134#176'W'#177'G'#220'*'#185#225'Y~'#247'6'#244
-  +#20#160'S'#167'C'#192#223#207#11'~'#242#208'D{'#179#10#225#168'#'#28'1'#194
-  +#17'"'#28'>'#194#225#162#212#176#17#206'J'#132#131#198#216'i'#5#194'QB8K'#17
-  +#206'b'#132#179#8#225',@8'#243#17#206'<'#132#243'/'#132#163#128'p'#190'E8'
-  +#179#160#222'J'#30'n'#27'N'#255#207#202'I'#147'l'#130#248'r'#218'g'#132'S'
-  +#148'X'#172#137#131'_'#5#170#195#234'E'#182'GMm'#197#7#26#26#156'O*'#170#202
-  +#243#139'Ko'#188#0't'#165#7#0#145'z'#133#218#25'u'#30#142#195'"'#180'7m'#192
-  +#177'n'#130'S'#191'o'#6#212'[N'#135#6#139'i'#208'`.'#7'E:'#147'n'#162'g'#155
-  +#129'c@'#151#0'Q'#204'C'#234#181'z5'#251'C'#145'H4'#186#170#186#162#186#236
-  +'Nq'#143#0':'#31#238#7#185'^fPpT'#31'n:'#174'k'#13#199#181#29'8'#135#218#129
-  ,'c'#211'6'#156#255#152'L'#174'[(;'#209#157#197#154'4'#1#207#181'o'#215#0'5y'
-  +#175#247'H'#189#16#144'l'#249#221#146#226#202#170';R'#7't'#250#220')'#8#193
-  +'`'#240#129#219#218#214#146#227#214#14#156#195']'#135#211#176'g2x)O(E'#245
-  +#210'`'#177#198#141#150'x'#180#183';'#13#136#12#180#196'{'#201#8#133#194'q'
-  +#215'o^'#205#169#169'y'#12#215'o'#229'K]'#130'BO'#133#192'qG;'#168'rT'#235#30
-  +#28#219'v'#224#236'm'#130#211#176'{"4'#236#250#2#158#239#28'W['#169#247#249
-  +'u'#167#239#199#11'X,'#133'A]'#2#164#174#174'>'#4#165'g$B'#154#152's%#'#161
-  +#250'~%'#220#171#174#148#190#4#133#5'A'#152#199#1'(8'#184#230'%8*'#127#194'q'
-  +'l'#7#142#221#171#225'4'#16#28#243#191#194'i0'#27#7#13#166'c'#225#218':'#217
-  +#7#159#14#158#176#134#197#26'5'#172'e\'#212#161#0#145#242'-'#28'C9'#234#156
-  +'Q(A'#147#179's'#211#19'o'#20#23'@M'#205'#'#184'SQ*5@Q'#167'|'#225'!'#169#215
-  +#171#162'c'#231'v'#2#192#3#232#198#247#183'v'#227#245#214'_#'#156#153#8#231
-  +'+'#132#243'%'#194#153#138'p'#166' '#156'I'#8'g'#2#194#25#143'p>G8'#178#16
-  +#193#145#189'7'#184#255#4'34'#210'S'#208#237#247#239#148#4'5'#3#162#200#25'_'
-  +'?'#195'1-'#251'rZ2'#229'^7o_g '#161'WCH'#217#221#2't62'#28#163#230' '#136'='
-  +#176#5'~s'#225'w'#14#142'};p,'#218#129'c"'#11#13';?'#131'<'#205#209#143#237
-  +#190#27'k'#205'bM'#29'M'#128':-A'#20#3'Q'#128#136'p'#198#226#248'*'#235'rZ'
-  +#10#1'b '#149'\'#131#199'O'#30#192#195'G'#213'Px#'#191'['#18#20'q'#246#20'x'
-  +#250'x'#131#237'.'#147#14#167#14'm'#194#177'l'#7#142#233#159'p'#26#140'GA'
-  +#227#142#145#208'h$'#3#249#171'e2'#154#140'5'#171'O'#167#1'Qz!'#20#170#142
-  +#195'Wy'#4#144#218#12#136#6#25#235#187#149'e'#240#244#167'''p'#183#162#28#242
-  +#11's'#187'l'#131#206#4#184#162'{'#215#236'p'#234#208#29'8'#141#18'8'#127#24
-  +#202'4^'#18#140#172'\'#240#217#216#3','#214#132'I,'#150'|'#191#206#1#194#28
-  +#140#141'1'#16'W'#141#251#5#159#175#250'MfvJZK@-'#165#169#234#222']x'#242#228
-  +#17'<z'#252#0'n'#151#221#130#220#188#172#14#3#138#12#243#134'g.'#220#174#195
-  +#217#215#14#28#179'W'#195'!'#201'1'#159'='#186#0#193'h7'#217#160'/'#223'm'
-  +#233#234';'#4#136#202#27'b'#177'x8y0>'#159#173#144#145#157#146#254'*@4'#10'o'
-  +#228'A^a'#14#20'^'#207#135#178';%'#240#240'a5B'#171#192#207'W!-3'#153#129#212
-  +#22#160#144#147#24'A'#219#239#134#24'S><'#178'_!'#137#142'['#230'U'#243'_'#13
-  +#199#170#29'8'#187#218#129#179']'#6#26#183#141#128#223#183#12#175#247'\<'#210
-  +#143#197#154'<'#230#229'bZ'#135#1#177#217#236#17#228#193#16#208#220#244#172
-  +#228#140#246#0#145#193'F;'#5')'#25#137#140#228'dd'#165'@Aa'#30#220#190']'#12
-  +#197'%7'#225#250#245#2#184#146#151#131#199'S!9%'#1'.'#197#199'@tl'#20#156#139
-  +'<'#3'A'#161#129#224#228'|'#20'r'#172#132'/R'#135#191#203#171#254#18#0#238'E'
-  +'7'#190#167#181#27'o0'#25#131'pF#'#156'O'#17#206''''#8#231'c'#132#243#17'4'
-  +#26'~'#8#141#6#31'@'#195#214#161'`'#254#141#140'1J'#209#144#174#184#249'Ab'
-  +#177#202#199'b1W'#14#1#205'O'#207'L'#206#236'('#160#248#228#139#140#180#144
-  +#148#156'>'#135'y'#22'f'#234#225#167'C1'#223#10#131#240#8#26#244'9'#140#25#17
-  +'g'#194#225'$'#30#203's'#212#238'r^'#197#192#217#221#14#28#163#214'p2'#132#31
-  +#253#188'k'#214#200#228'E'#163#199#28#194#136'z!%'#173']q'#243#131'('#138'&'
-  +#23'/'#16'p'#22#164'e&eu'#21#16#21#193#168#132'J'#157#137'c'#158'n'#224#226
-  +'v'#4#28#157#14#194#254#131#182'`'#183#223#26#142'Z'#239#132'_'#14','#237'r'
-  +#234#208'&'#156#29#127#133'C'#146#147'+'#30#254'dH'#255#241#152'jL'#251#156
-  +#197#250'|(U'#26';'#5#136'2y'#170';s8'#156'O'#132'B'#246't'#129#128#251'}jFR'
-  +'vO'#0#178'?`'#3'V6'#251'`'#171#161#17#172'_'#163#13#251#214#242';'#150':t'
-  +#17'N#'#170'U'#163#254'`8'#185'lx'#28'J'#206#216#150#238#189#211#128'D"'#149
-  +#145'\'#17'w'#6#2'Z'#154#154#145#152#211'S'#128'H'#138#8#146#185#165#5#20'Y'
-  +#174#232't^'#213#10#142'q'#219'p~'#217#244'~'#221#137'%#*'#146#216#195'*'#207
-  +'-'#31#150#131'^l'#22'%'#171#157#2#212'\'#11#162'R'#7#190'~J1'#16#2'Z'#158
-  +#154#158#144#219'S'#128#154'!'#29#179'1'#146#228'U'#179#225#153'e'#231#242
-  +#170#134#157#237#192#217#138#146#179'e(Tk'#13'}>t'#224#196']}'#251'NUd'#177
-  +#198'N'#151#228'`ow'#9#16'u0'#154#242'0'#206','#4#164#140#193#223#149#158#6
-  +'t'#216#218#12#14#233#175#2']uu0Z'#163#209#225#188#234#229#232#184'q'#251#8
-  +#132'3'#28#225#12'C8'#239'#'#156'!'#168'V'#239'A'#163#222';'#176'g'#150'L'
-  +#216#192#129'_'#142#165'BY[e'#215#14#3#18#137'V'#142'F'#21#251#22#1#169'&'
-  +#167'%'#228#245'$'#160#166'a'#11'6'#246#4#203#14'"-'#214't8'#175'z%'#28#131
-  +'?'#225'X*|Ze7oTn'#142'`H'#181#247#130#15#227#6#12#152':'#238'U'#182#167'S'
-  +#128#168'X'#198'$'#170'b'#190#2#2#226'&'#165#198#231#247'4'#160#131#135#236
-  +#193#209#217#129#249#254#138#21#7'~'#222'5'#3#220'5'#20'!t'#253#130#14#229'U'
-  +#12#28#195#214'pHr'#14#204#31'U:~'#194'\]YY'#133#165#131#7#203#205#29':t'#218
-  +#7'].'#218#183#4#196'Q'#227#140'A'#23#255'/'#4'$'#200#186#156'^'#254':'#0#29
-  +'9z'#8'\'#221#157#193#195#193#18#12#183#26#195#174'=V'#16'i'#190#134#129'S'
-  +#135'6'#231#154#142#220'+S'#135#151#225'X'#177#231'C'#168#246'"x'#174'3'#24
-  +'|'#151#200#148#207#156#169#168#177#156#205#158#240#205#162'E'#31#202#201#181
-  ,#206#222#187#12#136'J'#173'<'#17'o'#30#2#18'_'#189#150#251#224#245#1'r'#2#247
-  +'c.'#224#238#225#10#190#254'>'#16'wH'#23#158#153'L'#132'}'#162#229#176'}'#243
-  +#214#23'p'#206#174#158#14#183#245#190'`R'#135#26#189#145'`&\'#9#255#213#31
-  +#193'H'#142#249#186'U8g'#24'8'#219#237#251'M'#253#235#169#161's'#230'-'#225
-  +'q'#185'?|A]'#26#170#183'w'#27#16'Sn]'#197#31#139'*6'#31#1'i'#20#151#222#248
-  +#247#235#2#228#230#225#12#158#222#238#224#23#224#5#129'!'#254#16#236#229#12#7
-  +'v'#153#224#191'?'#2#222#190#190#240#208'x*'#148#234'O'#2'}'#189#157#16'ak'
-  +#200'H'#206'Y'#205#175#225#224'a7'#136'8'#180#27'~'#214#251#24#246#153#219'b'
-  +#202#147#136#185'^'#240#239#203#150')'#235#252#160#170#186#132#203#229'~AU'
-  +#210'n'#3#162#31'P'#209'R'#25#172#166#198#253#156#162'h'#4#180#230'v'#233#205
-  +#154#188#194#203#175#29#16#237#242#8'9'#25#196#228'k'#167#207#133#227'o'#158
-  +#135#24#167#157'`cf'#134#240'B1'#9#142#133#220#189#203#193#214#196#20#162'b'
-  +#162'!=;'#21#206#157'?'#11'g'#163'"!'#13#243'A'#223#0#175'_'#249'|'#206':'
-  +#190#152#189#184#169'2'#193#31'*'#21'@$'#138'T'#172'G'#21'['#132#128#180#174
-  +#22'^'#169#194#241'F'#0'Q'#207#158#138#251'?'#198#156#131#216'K?B'#204#197#11
-  +#8'#'#18'R3'#147'!''/'#19'R'#210#147'q'#190'X'#184#156#159#205't]'#232'B'#210
-  +#240#11#244#134#208#240#192#159#5'"'#238#6#10'v'#241'|&H'#17#144#250#16#134
-  +#184#152#191#152'&HN'#139'/~R'#243#24'.'#224#194#222'$'#160#139#241#23' 1%'
-  +#14#225'$B'#246#149't'#166#204'BPh'#183#9#173#163'yM4/'#253'^\R'#236'}'#190
-  +#144#187'Y('#228')'#161#138'M'#162'2'#178'T'#0#17'i'#204#195'&'#16'y'#4#180
-  +')>)'#246'&5'#14#239#222'-G'#177#245#129#194#162#188'7'#10'(-+'#233#5#160#151
-  +'/'#216#137'`'#127#140#165#172#152#154'wjV'#226'='#4#164#199#19#242'~'#192
-  +#243#153',U@T,'#195#31'VB@'#186#151#18'cn'#209#228'U'#213#21'PVV'#138''''#233
-  +#4#24#27#253#163#0#165'g'#167#224#223#31#6'[{+'#240#246';'#206#172'K'#2'h+_'
-  +#196'W'#193#243#153#178'Bm'#197#7#218#218#242#253#164#2#136'+'#230'N'#194#31
-  +'^'#129#128#182#196'%'#196#20'7/'#164#234#222#29#168#170#170#192#197'8'#130
-  +#27#186#227#156'+'#25'o'#20#16#181#160'|'#252#189#192't'#143#9#194#177#134
-  +#128' '#223#23#234#150#146#153'X'#141#128#182'Q6'#128#231'#G'#141#8#234#249
-  +'u'#27#16#137'"'#137'$z'#0#21#4'd'#24#23#31']'#210'R'#140#203#239#150#0'uZS'
-  +#211'R`'#187#177#17#236'6'#223#5#222#8' .1'#230#181#0'JL'#141#131'@'#252#206
-  +#218#206#10#182#26'n'#1's'#203'='#204#223#159#141#138'h'#165'n)'#153#9'd'#131
-  +'v'#160'&p'#240'|'#166'J'#7#144#5#2#210'T}'#159#175#206#159'B'#228'i'#2'\X'
-  +#233#203#186'N'#141'DR'#185#199#143#31'ARr"88:'#192#234#181#171#193#192#200
-  +#128#17#245#136#179'aR'#5'D5l'#15'OW0'#221'm'#2'k'#215'k'#193#22'C}'#216#131
-  +#23#134#18']'#218'*L'#30#237#229'5"'#160#7#184'~'#19#190#136#195#195#243#153
-  +'F'#157#154'n'#3'"'#29#165'm/D'#156#200#211#4#8#168#172#173'@'#241'Fq!'#148
-  +#150#23#195#253#7#213#240#232#209#3't'#195'1`'#177#207#18'Ty'#28#208'\'#191
-  +#22't'#244'u'#193'p'#135'!'#152#152#237#132'='#22#187'a'#159#141#5'sR'#173#19
-  +#213'&@'#251#15#217'16'#196#210#218#2#165#210#12#140#205'v'#128#161#209'6'
-  +#216#172#175#3#2#177#16'6l'#222#0'&'#187'w'#130'-'#254#189#179#235#17'f'#219
-  +'L&'#170'v[kK'#206'`'#0#237#162't'#137#138#127'R'#2#164#221'O'#210'4'#156#198
-  +#144#199#9'b/]'#232'P.'#150#157#155#14#215#138#174'B'#249#157'2(-+'#129#147
-  +#225#232'n'#15#31#196#147'2'#133#13':'#155#129'+'#20#193#130'%KA^a'#14#204
-  +#156#173#0#10#223#205#135#133'K'#151#194'w'#139#22#129#194#188#239#152#207
-  +#139#151'-'#133#149'<.'#168#173'V'#135'u'#218#235'@o'#171'.'#236'4'#221#193
-  +'@qtr'#128#19'hcb'#227#127'l'#211#139#181#6#20#255#16#215#191#23'/'#180#136
-  +#26#160'l6'#251'C'#169#0'"'#210'h'#212#190'$'#242'4'#1#6'hw:'#155'j\'#140#143
-  +#134#180#140#20'H'#207'L'#133'L'#28#25#153'i'#204#200#204'J'#131#196#164'x'
-  +#166'`'#239#229#227#9#135#157#209#216'3y'#151'7'#4#5#7'@@'#160'/'#166#20#158
-  +'p'#220#203#157'QIz'#165'}'#139#225#168#178#29'q'#243#173#0#165#199'?'#194
-  +#245'['#226#133'V'#163#234'('#245#250#164#6#136'D'#146'''d'#139#4'"'#158'El\'
-  +#212']i'#230'b'#204'@'#21'q'#243'pA'#187#226#6#174'n'#206#224#236#226#200#168
-  +#141#251#177#238#197'A-GRz'#252'c'#4'dM'#249#164'P'#200#153')'#22'+'#15#151
-  +#26' '#18'I"'#143#128#172#240#132'+'#222'D'#178#218'm@i'#151#158'  ;T'#177
-  +#213'T>'#150'4C'#251'w'#27#16#233#170#164'`'#175#129#128'l'#163'/FU'#246'F@'
-  +#137'M'#128#14#224#133#214#196#243#249#26#225'|$'#29'@'#168#171'$'#146#168'b'
-  +#171#5'B'#222#254#232#139#145'U'#189#20'P'#13#2':'#132#128#214'Q}]j'#128'HWI'
-  +'$'#137'<'#2'r'#184#16#27'y'#175'W'#2'J'#141'{'#138#128#142#160'&l'#160#250
-  +':'#181#211#165#4'H<'#156'D'#18#163'h-'#4#228'x!'#246#252#253#222#8'(!5'#238
-  +''''#4't'#20'm'#208'F'#148#160#217#180')U'#170#128'H4'#17#146#211#143'1'#231
-  +#31#244'V@x'#129']'#169'"!e@'#168'bj|y'#137#4'9'#247'b@?'#163#4#185'q'#5#220
-  +'M'#164'bR'#179'A'#140#155'W'#227#127'E'#229'V'#158#128#235#132'yU'#175#244
-  +'b'#209'q'#145#143'yB'#142'+'#142#245#164#17'R'#137#131'Z'#148';'#228'(DG@'#7
-  +'q'#209#133#189#17#144'_'#160#247'm'#178#161'h*VQf@9'#166#133'E7'#10'f'#205
-  ,#155#23#168#237#163'*T'#29'Gmg'#138#164#183#25#27#196#182',i'#246#22'@'#22
-  +#251#246#166#242#4#28#27#12'W'#168#220'1A'#178'9'#190'O'#183#0'Q'#215'QSSq'
-  +#160#138'He'#164#168#169'/'#182#5'm'#145'wXDpuo'#2#20#21's'#182'F '#228#248
-  +'#'#160#237'|>{!'#237'5'#160'}O'#180#255#169'[w'#28'6'#151'<VHJ'#30'|>GH'#225
-  +#186#214#250#181'QYW'#210#255#232#13#128'p='#245':'#250#155'.'#146'y@3'#161
-  +#206#231#171'v('#147#239#240#13'u-v'#153#209#22#152#185#228'&y"'#174#139#174
-  +#254#230#196#180#236#228#223#255#201#128#240'x'#237'6#'#131't\'#179';S'#176
-  +#23#241#20'i'#159#1'm'#200#248';'#245#234#212'-'#153#205#253'1'#252#209#241
-  +'x'#21#150#160'''0'#160'I'#215'ik'#197'_L'#136#254#239'?'#17'Pr'#218#165#223
-  +'6'#235'nLE'#195#236#137#182#211#136#246'6Q?'#140'J'#200#29#145#158#206#222
-  +#245#220'|'#207#198'0'#166#128'/'#230'/'#163#2'>E'#166'8'#249#249#195'N'#7
-  +#203'.'#231'g'#213#255#19#0#225#252#13#174#30#206#21'B'#17#255#2'J'#186';'
-  +#217#29'j'#245'P'''#131#242'J'#218#24#255'w'#182#167'K'#247#205#183#220'uOm '
-  +'QS'#167'u'#3#234#182'=.$x'#173#150'f'#202'qo'#247#251#151#146'b'#254'x'#19
-  +#128#146#210'.'#213#250#6'x>'#210#222#180'.'#3#215#20'&'#16#240#28'P'#210'u$'
-  +#157#212#201#148#17'('#162#195#161#243#144#250'}'#243'/'#223#191#218#226#222
-  +#13#5'I'#165'q'#7'E'#217'|'#1#239#20#190'O'#212#219#162'St'#196#197#177#230
-  +#244#249'S'#181'='#9#232#252#133'3u'#174#30'NO'#13#140#244'oa|'#147#132'sGP:'
-  +'!)'#206#171#145#205'$'#179'@'#23'U__'#127'@G'#236#142'T'#30'MA'#234'Fq'#4'G'
-  +#131#243#9#155#10#250'(M'#20#128#161#186#237#164#140#153'/'#226#6#241'E'#188
-  +'h|'#159#142'v'#224#214'~'#7#155#26#223#0#175'?'#2'C'#2#26#187#183'y!'#176'1'
-  +' '#200#183#246#208#145#3'O'#245#13'tJp'#142#12#156'#'#22']x'#8'J'#139'3O'
-  +#192'3'#19#136#185'k'#208#149'/'#166'`'#144#28#11#181#206'i'#189#157#145#28
-  +'i<'#253#133'1'#220#180#11#159'"Rf'#139#30#179' '#246'B&'#226#22#242#244#241
-  +#255#251'p'#225't5'#131'xBn'#164'@'#200'M'#192#247#153'j'#26#162#171'Z'#27'4'
-  +'K6'#235'jWl1'#208'}'#176#205'hK'#141#145#241#182'_Lw'#25'?'#219#179#215#236
-  +#185#233'n'#227'_w'#154#26#253'{'#187#177#193'S'#131'mz'#15'u'#244'7Vji'#175
-  +#189#173#174'!.'#196#191#207'"'#9'EI'#141'B'#27#24#140#23#194#141#202#168'M'
-  +#29'S'#142#26#230'Y'#223'S'#245#147#195#225#140#145#152#130'A'#180#206#142
-  +#218#28#169'?'#30#135'&f'#238#169'Wn'#186#167#30#23'6'#138#154#140#148'-3'
-  +#173'j'#1'WLv'#0#13#165')'#197'OL'#185#1#3'M'#146'0'#4#22#142'''z'#14#143#253
-  +#136'#'#134'/'#224'\'#196#215'8<v'#145#249'L'#199#5#220#243#164'6d'#227'Pu|('
-  +#188'@)'#181'g'#218'7"'#174'.'#197'5'#228#157#240'b'#204'!#'#188#18'/'#20#129
-  +#161#245#208#186#186'"5='#242#128#165'fP$Q'#18#145#166'L'#249'31z<'#166'T"f'
-  +#207#199' s'#5#158#16#159'j'#194'T'#147'a'#174':'#217'.'#17#207#140'i'#199
-  +#136'8'#22#212'u'#160't'#134'>'#211'q'#4'k'#204#132#20#152#129'S'#178#140#18
-  +'" '#143'D'#241#12'U'#5#233'b'#208#246'@I'#233#130#246#16#12#146#6#152#30'yD'
-  +'W'#11#251#212'G'#18#18#12#162#205'W'#18'Q'#151#145#220#177'H'#6's'#10'U'#7
-  +#240#245#27#218#247'H'#247#127#144'j6'#169#7'{1'#237#230#199'0b'#161#228#248
-  +'\*MPM'#156#203#165'{E'#248#227'I}h'#231'?E'#195#146#216#140#130#216#254#205
-  +#170'$'#13'0='#250#12#179#150'O'#166'"X'#205#207#25#162#19'a'#158#26#131#208
-  +#168#157'M1'#137#164#236')C'#198#158'v'#243#147'Q'#165#155#135#233'3'#29#167
-  +#239#149#197#202#195#201#206#17#12'I'#4'<'#136'<'#169#228'w'#251'4C'#145'&'
-  +#152#215#250#144#183#151#31#229#213#252#212#170#22#224#152#135'4'#189'<'#154
-  +#191#163#127''')'#187#244'i'#254#141#158#2#242#242#248#31'hmBI>'#216'IS'#0#0
-  +#0#0'IEND'#174'B`'#130#0#0#11'TSaveDialog'#11'SaveDialog1'#10'DefaultExt'#6#4
-  +'.fdb'#6'Filter'#6'%Firebird database|*.fdb|All files|*.*'#7'Options'#11#17
-  +'ofOverwritePrompt'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#168#1#3
-  +'top'#2' '#0#0#13'TIBConnection'#13'IBConnection1'#9'Connected'#8#11'LoginPr'
-  +'ompt'#8#14'KeepConnection'#8#9'LogEvents'#11#0#4'left'#3'?'#1#3'top'#2'f'#0
-  +#0#0
+  +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'
+  +#7#13'bbCreateClick'#8'TabOrder'#2#4#0#0#7'TBitBtn'#8'bbCancel'#4'Left'#2'x'
+  +#6'Height'#2'#'#3'Top'#3#215#0#5'Width'#2'['#6'Cancel'#9#7'Caption'#6#6'Canc'
+  +'el'#5'Color'#4#219#242#247#0#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#8'Ta'
+  +'bOrder'#2#5#0#0#9'TComboBox'#9'cbCharset'#4'Left'#2'W'#6'Height'#2#21#3'Top'
+  +#3#170#0#5'Width'#2'|'#10'ItemHeight'#2#13#8'TabOrder'#2#6#0#0#6'TImage'#6'I'
+  ,'mage1'#4'Left'#3#128#1#6'Height'#2'L'#3'Top'#2'`'#5'Width'#2'O'#12'Picture.'
+  +'Data'#10'@'#21#0#0#23'TPortableNetworkGraphic$'#21#0#0#137'PNG'#13#10#26#10
+  +#0#0#0#13'IHDR'#0#0#0'H'#0#0#0'H'#8#6#0#0#0'U'#237#179'G'#0#0#20#235'IDATx'
+  +#218#237#156#9'XT'#229#26#128#167#220'+'#181#204#140'L'#19#211#220#208'L'#201
+  +#18#175'&j.h '#179#207#0'*'#162#162#178'(("'#224#2#200#170#162#8#178');'#178
+  +'*'#184'A'#2'"'#251#142#8#130#162#130#128#2#226#138#213#189#215#178#216#190
+  +#251'}'#135#193#192#132'X'#6#141#231#185'='#207#223#204#156#145#249#255#243
+  +#158'o'#255#254'sX'#0#192#250#255'h{'#252#31'Bo'#0't:'#234#244#244#147#225
+  +#161'za'#167#130'=C'#194#2'c'#131#130#252'}N'#156#240#222#234#239#239'%'#143
+  +#223#191#213#235#1#225#127'o'#253#221#200#204#204'\'#150#150#145#146#155#148
+  +#26#255'(>9'#238#215#184#248#232#250#152#184#168#198#168#232's'#16'y'#225#12
+  +#156#139#138#128'3'#231#195'!'#226#236'I'#8'?'#19#10'''#B '#244'T'#16#132#156
+  +'<'#1#129#193#254#141#254#129'>'#245#190'~'#158#191'y'#249#30#127'|'#220#203
+  +'='#223#195#199#141#211#206'|o7'#191#127#163#128#154#23'aaa'#241#246#171'FQQ'
+  +#225#146#171#5#185'y'#217#151#211#235#19'S/A|R,'#196'%DCl'#252#5'@8p!'#246'<'
+  +'t'#4'PPh'#0#156#8#246#131#128'@'#31#240';'#225#13'>'#254#158#224#237'{'#12
+  +'<'#142#187#212'{'#31's'#188'a'#127#208'^$'''#199#239#175#168#168#216#247#150
+  +#21#127#225',Y9'#153#241#227#149#6#240#249#252'>'#184#190#230#241#246'k'#3
+  +#212#18#10'-'#130#22#214'<'#10#138#10#20#139'n'#22#228#230#23'\'#174'K'#203
+  +'J'#134#148#244#4'HJ'#187#4#9')qR'#1#228#27#224#5#30#158#30#224#233#237#129
+  +#128#220#224#134#171'.DZo'#2'k'#27#219'zO'''#219#226'_]'#4#207#253#214','#242
+  +#28'8p'#146#236#166'%sFTY/w'#26'4h'#234'hYY'#197#129']'#145#168'.'#195'!'#24
+  +#218#218#218#253#16'P'#127'%%'#165#1'999'#147'JJoV'#231#230'gAfN*'#164'g''Cj'
+  +'f'#146#212#1'Ey'#218'B'#161#139#30#28#217'o'#13#135#15';'#192#243'cjP'#235
+  +'!'#2'+'#189#13#144'b'#167#5'u'#174#28#184'f'#169#218'0'#127#254#202'-'#15'l'
+  +#149'.'#215'9-'#7#246'W'#242'F'#239#190'+'''#211#4'I'#238'='#22'K'#177'o'#143
+  +#0'"8$1'#242#242#242#253#8#10#190#31#164#172#172#252'NYY'#201#201'k7'#243'!'
+  +'''/'#3#178'r'#211#165#14#136#224#248#250'{3'#227#162#235'n'#168#245'Z'#13'w'
+  +#28'WA'#232#222'M'#12#156'Zw'#1#252#225#202'c'#224#212#185#168'B'#173#179#10
+  +#148#217'(C'#221#145#229'P'#231#184#12#180#20#190#14#214#253#238#171#229'U'
+  +#230#243#163#211#245#230#248#176'X'#227'?'#234#168'4uZr'#228#181#229#251'ijj'
+  +#14'\'#181'j'#213#187'***'#131#203#239#150'^+'#184'~'#5'r'#175'f'#245#8#160
+  +#224#176#0#200#246'1'#135'd'#231'm'#224#226'`'#11#17#14#198'P'#235#169#1#181
+  +#18#201'!8'#181'n'#127#194#169';'#170#2'uN?'#188#128'Swx'#9#20#153#206#127
+  +#250#204'~'#225#175#245#7#21#193'O0+'#163#127#255#169#147'Y,'#198'>'#189'%5@'
+  +#140'ZY('#246'%'#169'!0'#170#170#170#239'WV'#150#223')('#186#2'y'#5'9='#8#232
+  +#4#164#187#155'@'#173#183'&<;'#182#10#158#184#180#134'S'#247'7p'#234#14'}'#15
+  +'u'#14#11#129#224#212#239#255#14#12#230#205'H'#158'3n'#230#194','#189'Yk'#163
+  +'5g'#162''''#148'm'#215'6uJ'#181#148#244#149#6#16#28'|?'#172#248#246#173#227
+  +#197#165'E'#144#127#237'r'#143#0#10#11#15'A'#143#229#11#222'~'#158#16#228#184
+  +#143'Q'#171#218#227#237#192'qn'#7#206#129'&8'#245#246's'#161#210#244#219'g'
+  +#191'Y'#205'~^o'#243#13#248'p'#190'<'#199'b'#141#29#211#158#135#235#168#4#189
+  +'E'#6'YY['#249#29'55'#181#15'N'#158#9#154'q'#239'~E#IOO'#1#138#13'8'#2'5'#158
+  +#27#225#198#209#141#144'ypc'#219'p'#142#182#3#231'`k8'#245'vs'#160#222'v6'#16
+  +#156#223'-'#229#27'f'#141#158#236#136'F'#251#179'n'#1'j'#182'=d'#148#213#213
+  +#149#134#176'W'#177'G'#220'*'#185#225'Y~'#247'6'#244#20#160'S'#167'C'#192#223
+  +#207#11'~'#242#208'D{'#179#10#225#168'#'#28'1'#194#17'"'#28'>'#194#225#162
+  +#212#176#17#206'J'#132#131#198#216'i'#5#194'QB8K'#17#206'b'#132#179#8#225',@'
+  +'8'#243#17#206'<'#132#243'/'#132#163#128'p'#190'E8'#179#160#222'J'#30'n'#27
+  +'N'#255#207#202'I'#147'l'#130#248'r'#218'g'#132'S'#148'X'#172#137#131'_'#5
+  +#170#195#234'E'#182'GMm'#197#7#26#26#156'O*'#170#202#243#139'Ko'#188#0't'#165
+  +#7#0#145'z'#133#218#25'u'#30#142#195'"'#180'7m'#192#177'n'#130'S'#191'o'#6
+  +#212'[N'#135#6#139'i'#208'`.'#7'E:'#147'n'#162'g'#155#129'c@'#151#0'Q'#204'C'
+  +#234#181'z5'#251'C'#145'H4'#186#170#186#162#186#236'Nq'#143#0':'#31#238#7#185
+  +'^fPpT'#31'n:'#174'k'#13#199#181#29'8'#135#218#129'c'#211'6'#156#255#152'L'
+  +#174'[(;'#209#157#197#154'4'#1#207#181'o'#215#0'5y'#175#247'H'#189#16#144'l'
+  +#249#221#146#226#202#170';R'#7't'#250#220')'#8#193'`'#240#129#219#218#214#146
+  +#227#214#14#156#195']'#135#211#176'g2x)O(E'#245#210'`'#177#198#141#150'x'#180
+  +#183';'#13#136#12#180#196'{'#201#8#133#194'q'#215'o^'#205#169#169'y'#12#215
+  +'o'#229'K]'#130'BO'#133#192'qG;'#168'rT'#235#30#28#219'v'#224#236'm'#130#211
+  +#176'{"4'#236#250#2#158#239#28'W['#169#247#249'u'#167#239#199#11'X,'#133'A]'
+  +#2#164#174#174'>'#4#165'g$B'#154#152's%#'#161#250'~%'#220#171#174#148#190#4
+  +#133#5'A'#152#199#1'(8'#184#230'%8*'#127#194'ql'#7#142#221#171#225'4'#16#28
+  +#243#191#194'i0'#27#7#13#166'c'#225#218':'#217#7#159#14#158#176#134#197#26'5'
+  ,#172'e\'#212#161#0#145#242'-'#28'C9'#234#156'Q(A'#147#179's'#211#19'o'#20#23
+  +'@M'#205'#'#184'SQ*5@Q'#167'|'#225'!'#169#215#171#162'c'#231'v'#2#192#3#232
+  +#198#247#183'v'#227#245#214'_#'#156#153#8#231'+'#132#243'%'#194#153#138'p'
+  +#166' '#156'I'#8'g'#2#194#25#143'p>G8'#178#16#193#145#189'7'#184#255#4'34'
+  +#210'S'#208#237#247#239#148#4'5'#3#162#200#25'_?'#195'1-'#251'rZ2'#229'^7o_g'
+  +' '#161'WCH'#217#221#2't62'#28#163#230' '#136'='#176#5'~s'#225'w'#14#142'};p'
+  +','#218#129'c"'#11#13';?'#131'<'#205#209#143#237#190#27'k'#205'bM'#29'M'#128
+  +':-A'#20#3'Q'#128#136'p'#198#226#248'*'#235'rZ'#10#1'b '#149'\'#131#199'O'#30
+  +#192#195'G'#213'Px#'#191'['#18#20'q'#246#20'x'#250'x'#131#237'.'#147#14#167
+  +#14'm'#194#177'l'#7#142#233#159'p'#26#140'GA'#227#142#145#208'h$'#3#249#171
+  +'e2'#154#140'5'#171'O'#167#1'Qz!'#20#170#142#195'Wy'#4#144#218#12#136#6#25
+  +#235#187#149'e'#240#244#167'''p'#183#162#28#242#11's'#187'l'#131#206#4#184
+  +#162'{'#215#236'p'#234#208#29'8'#141#18'8'#127#24#202'4^'#18#140#172'\'#240
+  +#217#216#3','#214#132'I,'#150'|'#191#206#1#194#28#140#141'1'#16'W'#141#251#5
+  +#159#175#250'MfvJZK@-'#165#169#234#222']x'#242#228#17'<z'#252#0'n'#151#221
+  +#130#220#188#172#14#3#138#12#243#134'g.'#220#174#195#217#215#14#28#179'W'#195
+  +'!'#201'1'#159'='#186#0#193'h7'#217#160'/'#223'm'#233#234';'#4#136#202#27'b'
+  +#177'x8y0>'#159#173#144#145#157#146#254'*@4'#10'o'#228'A^a'#14#20'^'#207#135
+  +#178';%'#240#240'a5B'#171#192#207'W!-3'#153#129#212#22#160#144#147#24'A'#219
+  +#239#134#24'S><'#178'_!'#137#142'['#230'U'#243'_'#13#199#170#29'8'#187#218
+  +#129#179']'#6#26#183#141#128#223#183#12#175#247'\<'#210#143#197#154'<'#230
+  +#229'bZ'#135#1#177#217#236#17#228#193#16#208#220#244#172#228#140#246#0#145
+  +#193'F;'#5')'#25#137#140#228'dd'#165'@Aa'#30#220#190']'#12#197'%7'#225#250
+  +#245#2#184#146#151#131#199'S!9%'#1'.'#197#199'@tl'#20#156#139'<'#3'A'#161#129
+  +#224#228'|'#20'r'#172#132'/R'#135#191#203#171#254#18#0#238'E7'#190#167#181#27
+  +'o0'#25#131'pF#'#156'O'#17#206''''#8#231'c'#132#243#17'4'#26'~'#8#141#6#31'@'
+  +#195#214#161'`'#254#141#140'1J'#209#144#174#184#249'Ab'#177#202#199'b1W'#14#1
+  +#205'O'#207'L'#206#236'('#160#248#228#139#140#180#144#148#156'>'#135'y'#22'f'
+  +#234#225#167'C1'#223#10#131#240#8#26#244'9'#140#25#17'g'#194#225'$'#30#203's'
+  +#212#238'r^'#197#192#217#221#14#28#163#214'p2'#132#31#253#188'k'#214#200#228
+  +'E'#163#199#28#194#136'z!%'#173']q'#243#131'('#138'&'#23'/'#16'p'#22#164'e&e'
+  +'u'#21#16#21#193#168#132'J'#157#137'c'#158'n'#224#226'v'#4#28#157#14#194#254
+  +#131#182'`'#183#223#26#142'Z'#239#132'_'#14','#237'r'#234#208'&'#156#29#127
+  +#133'C'#146#147'+'#30#254'dH'#255#241#152'jL'#251#156#197#250'|(U'#26';'#5
+  +#136'2y'#170';s8'#156'O'#132'B'#246't'#129#128#251'}jFRvO'#0#178'?`'#3'V6'
+  +#251'`'#171#161#17#172'_'#163#13#251#214#242';'#150':t'#17'N#'#170'U'#163#254
+  +'`8'#185'lx'#28'J'#206#216#150#238#189#211#128'D"'#149#145'\'#17'w'#6#2'Z'
+  +#154#154#145#152#211'S'#128'H'#138#8#146#185#165#5#20'Y'#174#232't^'#213#10
+  +#142'q'#219'p~'#217#244'~'#221#137'%#*'#146#216#195'*'#207'-'#31#150#131'^l'
+  +#22'%'#171#157#2#212'\'#11#162'R'#7#190'~J1'#16#2'Z'#158#154#158#144#219'S'
+  +#128#154'!'#29#179'1'#146#228'U'#179#225#153'e'#231#242#170#134#157#237#192
+  +#217#138#146#179'e(Tk'#13'}>t'#224#196']}'#251'NUd'#177#198'N'#151#228'`ow'#9
+  +#16'u0'#154#242'0'#206','#4#164#140#193#223#149#158#6't'#216#218#12#14#233
+  +#175#2']uu0Z'#163#209#225#188#234#229#232#184'q'#251#8#132'3'#28#225#12'C8'
+  +#239'#'#156'!'#168'V'#239'A'#163#222';'#176'g'#150'L'#216#192#129'_'#142#165
+  +'BY[e'#215#14#3#18#137'V'#142'F'#21#251#22#1#169'&'#167'%'#228#245'$'#160#166
+  +'a'#11'6'#246#4#203#14'"-'#214't8'#175'z%'#28#131'?'#225'X*|Ze7oTn'#142'`H'
+  +#181#247#130#15#227#6#12#152':'#238'U'#182#167'S'#128#168'X'#198'$'#170'b'
+  +#190#2#2#226'&'#165#198#231#247'4'#160#131#135#236#193#209#217#129#249#254
+  +#138#21#7'~'#222'5'#3#220'5'#20'!t'#253#130#14#229'U'#12#28#195#214'pHr'#14
+  +#204#31'U:~'#194'\]YY'#133#165#131#7#203#205#29':t'#218#7'].'#218#183#4#196
+  +'Q'#227#140'A'#23#255'/'#4'$'#200#186#156'^'#254':'#0#29'9z'#8'\'#221#157#193
+  +#195#193#18#12#183#26#195#174'=V'#16'i'#190#134#129'S'#135'6'#231#154#142#220
+  +'+S'#135#151#225'X'#177#231'C'#168#246'"x'#174'3'#24'|'#151#200#148#207#156
+  +#169#168#177#156#205#158#240#205#162'E'#31#202#201#181#206#222#187#12#136'J'
+  +#173'<'#17'o'#30#2#18'_'#189#150#251#224#245#1'r'#2#247'c.'#224#238#225#10
+  +#190#254'>'#16'wH'#23#158#153'L'#132'}'#162#229#176'}'#243#214#23'p'#206#174
+  +#158#14#183#245#190'`R'#135#26#189#145'`&\'#9#255#213#31#193'H'#142#249#186
+  +'U8g'#24'8'#219#237#251'M'#253#235#169#161's'#230'-'#225'q'#185'?|A]'#26#170
+  +#183'w'#27#16'Sn]'#197#31#139'*6'#31#1'i'#20#151#222#248#247#235#2#228#230
+  +#225#12#158#222#238#224#23#224#5#129'!'#254#16#236#229#12#7'v'#153#224#191'?'
+  +#2#222#190#190#240#208'x*'#148#234'O'#2'}'#189#157#16'ak'#200'H'#206'Y'#205
+  +#175#225#224'a7'#136'8'#180#27'~'#214#251#24#246#153#219'b'#202#147#136#185
+  +'^'#240#239#203#150')'#235#252#160#170#186#132#203#229'~AU'#210'n'#3#162#31
+  ,'P'#209'R'#25#172#166#198#253#156#162'h'#4#180#230'v'#233#205#154#188#194#203
+  +#175#29#16#237#242#8'9'#25#196#228'k'#167#207#133#227'o'#158#135#24#167#157
+  +'`cf'#134#240'B1'#9#142#133#220#189#203#193#214#196#20#162'b'#162'!=;'#21#206
+  +#157'?'#11'g'#163'"!'#13#243'A'#223#0#175'_'#249'|'#206':'#190#152#189#184
+  +#169'2'#193#31'*'#21'@$'#138'T'#172'G'#21'['#132#128#180#174#22'^'#169#194
+  +#241'F'#0'Q'#207#158#138#251'?'#198#156#131#216'K?B'#204#197#11#8'#'#18'R3'
+  +#147'!''/'#19'R'#210#147'q'#190'X'#184#156#159#205't]'#232'B'#210#240#11#244
+  +#134#208#240#192#159#5'"'#238#6#10'v'#241'|&H'#17#144#250#16#134#184#152#191
+  +#152'&HN'#139'/~R'#243#24'.'#224#194#222'$'#160#139#241#23' 1%'#14#225'$B'
+  +#246#149't'#166#204'BPh'#183#9#173#163'yM4/'#253'^\R'#236'}'#190#144#187'Y('
+  +#228')'#161#138'M'#162'2'#178'T'#0#17'i'#204#195'&'#16'y'#4#180')>)'#246'&5'
+  +#14#239#222'-G'#177#245#129#194#162#188'7'#10'(-+'#233#5#160#151'/'#216#137
+  +'`'#127#140#165#172#152#154'wjV'#226'='#4#164#199#19#242'~'#192#243#153',U@T'
+  +','#195#31'VB@'#186#151#18'cn'#209#228'U'#213#21'PVV'#138''''#233#4#24#27#253
+  +#163#0#165'g'#167#224#223#31#6'[{+'#240#246';'#206#172'K'#2'h+_'#196'W'#193
+  +#243#153#178'Bm'#197#7#218#218#242#253#164#2#136'+'#230'N'#194#31'^'#129#128
+  +#182#196'%'#196#20'7/'#164#234#222#29#168#170#170#192#197'8'#130#27#186#227
+  +#156'+'#25'o'#20#16#181#160'|'#252#189#192't'#143#9#194#177#134#128' '#223#23
+  +#234#150#146#153'X'#141#128#182'Q6'#128#231'#G'#141#8#234#249'u'#27#16#137'"'
+  +#137'$z'#0#21#4'd'#24#23#31']'#210'R'#140#203#239#150#0'uZS'#211'R`'#187#177
+  +#17#236'6'#223#5#222#8' .1'#230#181#0'JL'#141#131'@'#252#206#218#206#10#182
+  +#26'n'#1's'#203'='#204#223#159#141#138'h'#165'n)'#153#9'd'#131'v'#160'&p'#240
+  +'|'#166'J'#7#144#5#2#210'T}'#159#175#206#159'B'#228'i'#2'\X'#233#203#186'N'
+  +#141'DR'#185#199#143#31'ARr"88:'#192#234#181#171#193#192#200#128#17#245#136
+  +#179'aR'#5'D5l'#15'OW0'#221'm'#2'k'#215'k'#193#22'C}'#216#131#23#134#18']'
+  +#218'*L'#30#237#229'5"'#160#7#184'~'#19#190#136#195#195#243#153'F'#157#154'n'
+  +#3'"'#29#165'm/D'#156#200#211#4#8#168#172#173'@'#241'Fq!'#148#150#23#195#253
+  +#7#213#240#232#209#3't'#195'1`'#177#207#18'Ty'#28#208'\'#191#22't'#244'u'#193
+  +'p'#135'!'#152#152#237#132'='#22#187'a'#159#141#5'sR'#173#19#213'&@'#251#15
+  +#217'16'#196#210#218#2#165#210#12#140#205'v'#128#161#209'6'#216#172#175#3#2
+  +#177#16'6l'#222#0'&'#187'w'#130'-'#254#189#179#235#17'f'#219'L&'#170'v[kK'
+  +#206'`'#0#237#162't'#137#138#127'R'#2#164#221'O'#210'4'#156#198#144#199#9'b/'
+  +']'#232'P.'#150#157#155#14#215#138#174'B'#249#157'2(-+'#129#147#225#232'n'#15
+  +#31#196#147'2'#133#13':'#155#129'+'#20#193#130'%KA^a'#14#204#156#173#0#10#223
+  +#205#135#133'K'#151#194'w'#139#22#129#194#188#239#152#207#139#151'-'#133#149
+  +'<.'#168#173'V'#135'u'#218#235'@o'#171'.'#236'4'#221#193'@qtr'#128#19'hcb'
+  +#227#127'l'#211#139#181#6#20#255#16#215#191#23'/'#180#136#26#160'l6'#251'C'
+  +#169#0'"'#210'h'#212#190'$'#242'4'#1#6'hw:'#155'j\'#140#143#134#180#140#20'H'
+  +#207'L'#133'L'#28#25#153'i'#204#200#204'J'#131#196#164'x'#166'`'#239#229#227
+  +#9#135#157#209#216'3y'#151'7'#4#5#7'@@'#160'/'#166#20#158'p'#220#203#157'QIz'
+  +#165'}'#139#225#168#178#29'q'#243#173#0#165#199'?'#194#245'['#226#133'V'#163
+  +#234'('#245#250#164#6#136'D'#146'''d'#139#4'"'#158'El\'#212']i'#230'b'#204'@'
+  +#21'q'#243'pA'#187#226#6#174'n'#206#224#236#226#200#168#141#251#177#238#197
+  +'A-GRz'#252'c'#4'dM'#249#164'P'#200#153')'#22'+'#15#151#26' '#18'I"'#143#128
+  +#172#240#132'+'#222'D'#178#218'm@i'#151#158'  ;T'#177#213'T>'#150'4C'#251'w'
+  +#27#16#233#170#164'`'#175#129#128'l'#163'/FU'#246'F@'#137'M'#128#14#224#133
+  +#214#196#243#249#26#225'|$'#29'@'#168#171'$'#146#168'b'#171#5'B'#222#254#232
+  +#139#145'U'#189#20'P'#13#2':'#132#128#214'Q}]j'#128'HWI$'#137'<'#2'r'#184#16
+  +#27'y'#175'W'#2'J'#141'{'#138#128#142#160'&l'#160#250':'#181#211#165#4'H<'
+  +#156'D'#18#163'h-'#4#228'x!'#246#252#253#222#8'(!5'#238''''#4't'#20'm'#208'F'
+  +#148#160#217#180')U'#170#128'H4'#17#146#211#143'1'#231#31#244'V@x'#129']'#169
+  +'"!e@'#168'bj|y'#137#4'9'#247'b@?'#163#4#185'q'#5#220'M'#164'bR'#179'A'#140
+  +#155'W'#227#127'E'#229'V'#158#128#235#132'yU'#175#244'b'#209'q'#145#143'yB'
+  +#142'+'#142#245#164#17'R'#137#131'Z'#148';'#228'(DG@'#7'q'#209#133#189#17#144
+  +'_'#160#247'm'#178#161'h*VQf@9'#166#133'E7'#10'f'#205#155#23#168#237#163'*T'
+  +#29'Gmg'#138#164#183#25#27#196#182',i'#246#22'@'#22#251#246#166#242#4#28#27
+  +#12'W'#168#220'1A'#178'9'#190'O'#183#0'Q'#215'QSSq'#160#138'He'#164#168#169
+  +'/'#182#5'm'#145'wXDpuo'#2#20#21's'#182'F '#228#248'#'#160#237'|>{!'#237'5'
+  +#160'}O'#180#255#169'[w'#28'6'#151'<VHJ'#30'|>GH'#225#186#214#250#181'QYW'
+  +#210#255#232#13#128'p='#245':'#250#155'.'#146'y@3'#161#206#231#171'v('#147
+  +#239#240#13'u-v'#153#209#22#152#185#228'&y"'#174#139#174#254#230#196#180#236
+  +#228#223#255#201#128#240'x'#237'6#'#131't\'#179';S'#176#23#241#20'i'#159#1'm'
+  +#200#248';'#245#234#212'-'#153#205#253'1'#252#209#241'x'#21#150#160'''0'#160
+  +'I'#215'ik'#197'_L'#136#254#239'?'#17'Pr'#218#165#223'6'#235'nLE'#195#236#137
+  ,#182#211#136#246'6Q?'#140'J'#200#29#145#158#206#222#245#220'|'#207#198'0'#166
+  +#128'/'#230'/'#163#2'>E'#166'8'#249#249#195'N'#7#203'.'#231'g'#213#255#19#0
+  +#225#252#13#174#30#206#21'B'#17#255#2'J'#186';'#217#29'j'#245'P'''#131#242'J'
+  +#218#24#255'w'#182#167'K'#247#205#183#220'uOm QS'#167'u'#3#234#182'=.$x'#173
+  +#150'f'#202'qo'#247#251#151#146'b'#254'x'#19#128#146#210'.'#213#250#6'x>'#210
+  +#222#180'.'#3#215#20'&'#16#240#28'P'#210'u$'#157#212#201#148#17'('#162#195
+  +#161#243#144#250'}'#243'/'#223#191#218#226#222#13#5'I'#165'q'#7'E'#217'|'#1
+  +#239#20#190'O'#212#219#162'St'#196#197#177#230#244#249'S'#181'='#9#232#252
+  +#133'3u'#174#30'NO'#13#140#244'oa|'#147#132'sGP:!)'#206#171#145#205'$'#179'@'
+  +#23'U__'#127'@G'#236#142'T'#30'MA'#234'Fq'#4'G'#131#243#9#155#10#250'(M'#20
+  +#128#161#186#237#164#140#153'/'#226#6#241'E'#188'h|'#159#142'v'#224#214'~'#7
+  +#155#26#223#0#175'?'#2'C'#2#26#187#183'y!'#176'1 '#200#183#246#208#145#3'O'
+  +#245#13'tJp'#142#12#156'#'#22']x'#8'J'#139'3O'#192'3'#19#136#185'k'#208#149
+  +'/'#166'`'#144#28#11#181#206'i'#189#157#145#28'i<'#253#133'1'#220#180#11#159
+  +'"Rf'#139#30#179' '#246'B&'#226#22#242#244#241#255#251'p'#225't5'#131'xBn'
+  +#164'@'#200'M'#192#247#153'j'#26#162#171'Z'#27'4K6'#235'jWl1'#208'}'#176#205
+  +'hK'#141#145#241#182'_Lw'#25'?'#219#179#215#236#185#233'n'#227'_w'#154#26#253
+  +'{'#187#177#193'S'#131'mz'#15'u'#244'7Vji'#175#189#173#174'!.'#196#191#207'"'
+  +#9'EI'#141'B'#27#24#140#23#194#141#202#168'M'#29'S'#142#26#230'Y'#223'S'#245
+  +#147#195#225#140#145#152#130'A'#180#206#142#218#28#169'?'#30#135'&f'#238#169
+  +'Wn'#186#167#30#23'6'#138#154#140#148'-3'#173'j'#1'WLv'#0#13#165')'#197'OL'
+  +#185#1#3'M'#146'0'#4#22#142'''z'#14#143#253#136'#'#134'/'#224'\'#196#215'8<v'
+  +#145#249'L'#199#5#220#243#164'6d'#227'Pu|('#188'@)'#181'g'#218'7"'#174'.'#197
+  +'5'#228#157#240'b'#204'!#'#188#18'/'#20#129#161#245#208#186#186'"5='#242#128
+  +#165'fP$Q'#18#145#166'L'#249'31z<'#166'T"f'#207#199' s'#5#158#16#159'j'#194
+  +'T'#147'a'#174':'#217'.'#17#207#140'i'#199#136'8'#22#212'u'#160't'#134'>'#211
+  +'q'#4'k'#204#132#20#152#129'S'#178#140#18'" '#143'D'#241#12'U'#5#233'b'#208
+  +#246'@I'#233#130#246#16#12#146#6#152#30'yDW'#11#251#212'G'#18#18#12#162#205
+  +'W'#18'Q'#151#145#220#177'H'#6's'#10'U'#7#240#245#27#218#247'H'#247#127#144
+  +'j6'#169#7'{1'#237#230#199'0b'#161#228#248'\*MPM'#156#203#165'{E'#248#227'I}'
+  +'h'#231'?E'#195#146#216#140#130#216#254#205#170'$'#13'0='#250#12#179#150'O'
+  +#166'"X'#205#207#25#162#19'a'#158#26#131#208#168#157'M1'#137#164#236')C'#198
+  +#158'v'#243#147'Q'#165#155#135#233'3'#29#167#239#149#197#202#195#201#206#17
+  +#12'I'#4'<'#136'<'#169#228'w'#251'4C'#145'&'#152#215#250#144#183#151#31#229
+  +#213#252#212#170#22#224#152#135'4'#189'<'#154#191#163#127''')'#187#244'i'#254
+  +#141#158#2#242#242#248#31'hmBI>'#216'IS'#0#0#0#0'IEND'#174'B`'#130#0#0#11'TS'
+  +'aveDialog'#11'SaveDialog1'#10'DefaultExt'#6#4'.fdb'#6'Filter'#6'%Firebird d'
+  +'atabase|*.fdb|All files|*.*'#7'Options'#11#17'ofOverwritePrompt'#14'ofEnabl'
+  +'eSizing'#12'ofViewDetail'#0#4'left'#3#168#1#3'top'#2' '#0#0#13'TIBConnectio'
+  +'n'#13'IBConnection1'#9'Connected'#8#11'LoginPrompt'#8#14'KeepConnection'#8#9
+  +'LogEvents'#11#0#4'left'#3'?'#1#3'top'#2'f'#0#0#0
 ]);

+ 11 - 1
createdb.pas

@@ -6,7 +6,7 @@ interface
 
 uses
   Classes, SysUtils, IBConnection, FileUtil, LResources, Forms, Controls,
-  Graphics, Dialogs, StdCtrls, Buttons, ExtCtrls;
+  Graphics, Dialogs, StdCtrls, Buttons, ExtCtrls, turbocommon;
 
 type
 
@@ -29,6 +29,7 @@ type
     SaveDialog1: TSaveDialog;
     procedure bbCreateClick(Sender: TObject);
     procedure btBrowseClick(Sender: TObject);
+    procedure FormCreate(Sender: TObject);
   private
     { private declarations }
   public
@@ -52,6 +53,15 @@ begin
   end;
 end;
 
+procedure TfmCreateDB.FormCreate(Sender: TObject);
+begin
+  // Load available character sets. Because we are not connected to a server,
+  // we cannot retrieve the available charater sets.
+  // Perhaps this can be done through the Services API but not high priority
+  CbCharSet.Items.AddStrings(FBCharacterSets);
+  CbCharSet.ItemIndex:=DefaultFBCharacterSet;
+end;
+
 procedure TfmCreateDB.bbCreateClick(Sender: TObject);
 begin
   IBConnection1.UserName:= edUserName.Text;

+ 12 - 7
main.pas

@@ -517,20 +517,25 @@ var
   dbIndex: Integer;
   FieldName: string;
   FieldType, DefaultValue: string;
-  FSize: Integer;
-  Description: string;
+  Size, Scale: Integer;
+  Description, Characterset, Collation: string;
   NotNull: Boolean;
 begin
   SelNode:= tvMain.Selected;
   dbIndex:= SelNode.Parent.Parent.Parent.OverlayIndex;
   FieldName:= Copy(SelNode.Text, 1, Pos(' ', SelNode.Text) - 1);
-  if dmSysTables.GetFieldInfo(dbIndex, SelNode.Parent.Text, FieldName, FieldType, FSize, NotNull,
-    DefaultValue, Description) then
+  if dmSysTables.GetFieldInfo(dbIndex, SelNode.Parent.Text, FieldName,
+    FieldType, Size, Scale, NotNull,
+    DefaultValue, Characterset, Collation, Description) then
   begin
     fmNewEditField:= TfmNewEditField.Create(nil);
-    fmNewEditField.Init(dbIndex, SelNode.Parent.Text, foEdit, FieldName, FieldType, DefaultValue, Description, FSize,
-      SelNode.OverlayIndex, not NotNull,  nil);
-
+    fmNewEditField.Init(dbIndex, SelNode.Parent.Text, foEdit,
+      FieldName, FieldType,
+      CharacterSet, Collation,
+      DefaultValue, Description,
+      Size, Scale,
+      SelNode.OverlayIndex, not NotNull,
+      nil);
     fmNewEditField.Show;
   end
   else

+ 83 - 14
neweditfield.lfm

@@ -1,15 +1,16 @@
 object fmNewEditField: TfmNewEditField
   Left = 442
-  Height = 336
+  Height = 417
   Top = 254
   Width = 320
   ActiveControl = edFieldName
   BorderIcons = [biSystemMenu]
   BorderStyle = bsDialog
   Caption = 'fmNewEditField'
-  ClientHeight = 336
+  ClientHeight = 417
   ClientWidth = 320
   OnClose = FormClose
+  OnCreate = FormCreate
   Position = poScreenCenter
   LCLVersion = '1.2.2.0'
   object Label1: TLabel
@@ -62,20 +63,28 @@ object fmNewEditField: TfmNewEditField
   object cbType: TComboBox
     Left = 101
     Height = 21
+    Hint = 'Data type for this field'
     Top = 40
     Width = 139
+    AutoComplete = True
+    AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
     Color = 16249563
     ItemHeight = 13
     OnChange = cbTypeChange
+    ParentShowHint = False
+    ShowHint = True
     Style = csDropDownList
     TabOrder = 1
   end
   object seSize: TSpinEdit
     Left = 101
     Height = 21
+    Hint = 'Size of field. For text fields: size in characters, not bytes'
     Top = 77
     Width = 50
     MaxValue = 10000
+    ParentShowHint = False
+    ShowHint = True
     TabOrder = 2
   end
   object cxAllowNull: TCheckBox
@@ -86,17 +95,17 @@ object fmNewEditField: TfmNewEditField
     Caption = 'Allow Null'
     Checked = True
     State = cbChecked
-    TabOrder = 4
+    TabOrder = 5
   end
   object bbAdd: TBitBtn
-    Left = 10
+    Left = 230
     Height = 30
-    Top = 288
+    Top = 377
     Width = 75
     Caption = 'Add'
     Color = 16249563
     OnClick = bbAddClick
-    TabOrder = 5
+    TabOrder = 6
   end
   object seOrder: TSpinEdit
     Left = 101
@@ -104,20 +113,20 @@ object fmNewEditField: TfmNewEditField
     Top = 112
     Width = 50
     MaxValue = 10000
-    TabOrder = 3
+    TabOrder = 4
     Value = 1
   end
   object edDefault: TEdit
-    Left = 112
+    Left = 101
     Height = 21
     Top = 186
-    Width = 116
-    TabOrder = 6
+    Width = 204
+    TabOrder = 7
   end
   object Label6: TLabel
     Left = 8
     Height = 13
-    Top = 232
+    Top = 321
     Width = 78
     Caption = 'Field Description'
     ParentColor = False
@@ -125,8 +134,68 @@ object fmNewEditField: TfmNewEditField
   object edDescription: TEdit
     Left = 8
     Height = 21
-    Top = 250
-    Width = 294
-    TabOrder = 7
+    Top = 339
+    Width = 297
+    TabOrder = 10
+  end
+  object Label7: TLabel
+    Left = 168
+    Height = 13
+    Top = 81
+    Width = 25
+    Caption = 'Scale'
+    ParentColor = False
+  end
+  object seScale: TSpinEdit
+    Left = 208
+    Height = 21
+    Hint = 'Sets decimal scale for numeric/decimal datatypes'
+    Top = 77
+    Width = 50
+    Enabled = False
+    MaxValue = 18
+    ParentShowHint = False
+    ShowHint = True
+    TabOrder = 3
+  end
+  object cbCharset: TComboBox
+    Left = 101
+    Height = 21
+    Hint = 'New field character setIF IT DIFFERS from database character set'
+    Top = 224
+    Width = 124
+    Enabled = False
+    ItemHeight = 13
+    OnChange = cbCharsetChange
+    TabOrder = 8
+    Text = 'NONE'
+  end
+  object lblCharset: TLabel
+    Left = 8
+    Height = 13
+    Top = 228
+    Width = 38
+    Caption = 'Charset'
+    ParentColor = False
+  end
+  object lblCollation: TLabel
+    Left = 8
+    Height = 13
+    Top = 268
+    Width = 41
+    Caption = 'Collation'
+    ParentColor = False
+  end
+  object cbCollation: TComboBox
+    Left = 101
+    Height = 21
+    Hint = 'Collation of new field IF IT DIFFERS from database collation'
+    Top = 264
+    Width = 124
+    Enabled = False
+    ItemHeight = 13
+    ParentShowHint = False
+    ShowHint = True
+    TabOrder = 9
   end
 end

+ 49 - 30
neweditfield.lrs

@@ -1,34 +1,53 @@
 { This is an automatically generated lazarus resource file }
 
 LazarusResources.Add('TfmNewEditField','FORMDATA',[
-  'TPF0'#15'TfmNewEditField'#14'fmNewEditField'#4'Left'#3#186#1#6'Height'#3'P'#1
-  +#3'Top'#3#254#0#5'Width'#3'@'#1#13'ActiveControl'#7#11'edFieldName'#11'Borde'
-  +'rIcons'#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#14
-  +'fmNewEditField'#12'ClientHeight'#3'P'#1#11'ClientWidth'#3'@'#1#7'OnClose'#7
-  +#9'FormClose'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'1.2.2.0'#0
-  +#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#13#3'Top'#2#14#5'Width'#2'4'#7
-  +'Caption'#6#10'Field Name'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'
-  +#2#8#6'Height'#2#13#3'Top'#2'0'#5'Width'#2'1'#7'Caption'#6#10'Field Type'#11
-  +'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2#8#6'Height'#2#13#3'Top'#2
-  +'Q'#5'Width'#2#19#7'Caption'#6#4'Size'#11'ParentColor'#8#0#0#6'TLabel'#6'Lab'
-  +'el4'#4'Left'#2#8#6'Height'#2#13#3'Top'#2't'#5'Width'#2'5'#7'Caption'#6#11'F'
-  +'ield Order'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#2#8#6'Height'
-  +#2#13#3'Top'#3#192#0#5'Width'#2'@'#7'Caption'#6#13'Default Value'#11'ParentC'
-  +'olor'#8#0#0#5'TEdit'#11'edFieldName'#4'Left'#2'e'#6'Height'#2#21#3'Top'#2#12
-  +#5'Width'#3#139#0#8'TabOrder'#2#0#0#0#9'TComboBox'#6'cbType'#4'Left'#2'e'#6
-  +'Height'#2#21#3'Top'#2'('#5'Width'#3#139#0#5'Color'#4#219#242#247#0#10'ItemH'
-  +'eight'#2#13#8'OnChange'#7#12'cbTypeChange'#5'Style'#7#14'csDropDownList'#8
-  +'TabOrder'#2#1#0#0#9'TSpinEdit'#6'seSize'#4'Left'#2'e'#6'Height'#2#21#3'Top'
-  +#2'M'#5'Width'#2'2'#8'MaxValue'#3#16''''#8'TabOrder'#2#2#0#0#9'TCheckBox'#11
-  +'cxAllowNull'#4'Left'#2#8#6'Height'#2#17#3'Top'#3#152#0#5'Width'#2'A'#7'Capt'
-  +'ion'#6#10'Allow Null'#7'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#4#0
-  +#0#7'TBitBtn'#5'bbAdd'#4'Left'#2#10#6'Height'#2#30#3'Top'#3' '#1#5'Width'#2
-  +'K'#7'Caption'#6#3'Add'#5'Color'#4#219#242#247#0#7'OnClick'#7#10'bbAddClick'
-  +#8'TabOrder'#2#5#0#0#9'TSpinEdit'#7'seOrder'#4'Left'#2'e'#6'Height'#2#21#3'T'
-  +'op'#2'p'#5'Width'#2'2'#8'MaxValue'#3#16''''#8'TabOrder'#2#3#5'Value'#2#1#0#0
-  +#5'TEdit'#9'edDefault'#4'Left'#2'p'#6'Height'#2#21#3'Top'#3#186#0#5'Width'#2
-  +'t'#8'TabOrder'#2#6#0#0#6'TLabel'#6'Label6'#4'Left'#2#8#6'Height'#2#13#3'Top'
-  +#3#232#0#5'Width'#2'N'#7'Caption'#6#17'Field Description'#11'ParentColor'#8#0
-  +#0#5'TEdit'#13'edDescription'#4'Left'#2#8#6'Height'#2#21#3'Top'#3#250#0#5'Wi'
-  +'dth'#3'&'#1#8'TabOrder'#2#7#0#0#0
+  'TPF0'#15'TfmNewEditField'#14'fmNewEditField'#4'Left'#3#186#1#6'Height'#3#161
+  +#1#3'Top'#3#254#0#5'Width'#3'@'#1#13'ActiveControl'#7#11'edFieldName'#11'Bor'
+  +'derIcons'#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6
+  +#14'fmNewEditField'#12'ClientHeight'#3#161#1#11'ClientWidth'#3'@'#1#7'OnClos'
+  +'e'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCen'
+  +'ter'#10'LCLVersion'#6#7'1.2.2.0'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'
+  +#2#13#3'Top'#2#14#5'Width'#2'4'#7'Caption'#6#10'Field Name'#11'ParentColor'#8
+  +#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#13#3'Top'#2'0'#5'Width'#2'1'
+  +#7'Caption'#6#10'Field Type'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Lef'
+  +'t'#2#8#6'Height'#2#13#3'Top'#2'Q'#5'Width'#2#19#7'Caption'#6#4'Size'#11'Par'
+  +'entColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2#8#6'Height'#2#13#3'Top'#2't'#5
+  +'Width'#2'5'#7'Caption'#6#11'Field Order'#11'ParentColor'#8#0#0#6'TLabel'#6
+  +'Label5'#4'Left'#2#8#6'Height'#2#13#3'Top'#3#192#0#5'Width'#2'@'#7'Caption'#6
+  +#13'Default Value'#11'ParentColor'#8#0#0#5'TEdit'#11'edFieldName'#4'Left'#2
+  +'e'#6'Height'#2#21#3'Top'#2#12#5'Width'#3#139#0#8'TabOrder'#2#0#0#0#9'TCombo'
+  +'Box'#6'cbType'#4'Left'#2'e'#6'Height'#2#21#4'Hint'#6#24'Data type for this '
+  +'field'#3'Top'#2'('#5'Width'#3#139#0#12'AutoComplete'#9#16'AutoCompleteText'
+  +#11#12'cbactEnabled'#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#5
+  +'Color'#4#219#242#247#0#10'ItemHeight'#2#13#8'OnChange'#7#12'cbTypeChange'#14
+  +'ParentShowHint'#8#8'ShowHint'#9#5'Style'#7#14'csDropDownList'#8'TabOrder'#2
+  +#1#0#0#9'TSpinEdit'#6'seSize'#4'Left'#2'e'#6'Height'#2#21#4'Hint'#6'=Size of'
+  +' field. For text fields: size in characters, not bytes'#3'Top'#2'M'#5'Width'
+  +#2'2'#8'MaxValue'#3#16''''#14'ParentShowHint'#8#8'ShowHint'#9#8'TabOrder'#2#2
+  +#0#0#9'TCheckBox'#11'cxAllowNull'#4'Left'#2#8#6'Height'#2#17#3'Top'#3#152#0#5
+  +'Width'#2'A'#7'Caption'#6#10'Allow Null'#7'Checked'#9#5'State'#7#9'cbChecked'
+  +#8'TabOrder'#2#5#0#0#7'TBitBtn'#5'bbAdd'#4'Left'#3#230#0#6'Height'#2#30#3'To'
+  +'p'#3'y'#1#5'Width'#2'K'#7'Caption'#6#3'Add'#5'Color'#4#219#242#247#0#7'OnCl'
+  +'ick'#7#10'bbAddClick'#8'TabOrder'#2#6#0#0#9'TSpinEdit'#7'seOrder'#4'Left'#2
+  +'e'#6'Height'#2#21#3'Top'#2'p'#5'Width'#2'2'#8'MaxValue'#3#16''''#8'TabOrder'
+  +#2#4#5'Value'#2#1#0#0#5'TEdit'#9'edDefault'#4'Left'#2'e'#6'Height'#2#21#3'To'
+  +'p'#3#186#0#5'Width'#3#204#0#8'TabOrder'#2#7#0#0#6'TLabel'#6'Label6'#4'Left'
+  +#2#8#6'Height'#2#13#3'Top'#3'A'#1#5'Width'#2'N'#7'Caption'#6#17'Field Descri'
+  +'ption'#11'ParentColor'#8#0#0#5'TEdit'#13'edDescription'#4'Left'#2#8#6'Heigh'
+  +'t'#2#21#3'Top'#3'S'#1#5'Width'#3')'#1#8'TabOrder'#2#10#0#0#6'TLabel'#6'Labe'
+  +'l7'#4'Left'#3#168#0#6'Height'#2#13#3'Top'#2'Q'#5'Width'#2#25#7'Caption'#6#5
+  +'Scale'#11'ParentColor'#8#0#0#9'TSpinEdit'#7'seScale'#4'Left'#3#208#0#6'Heig'
+  +'ht'#2#21#4'Hint'#6'0Sets decimal scale for numeric/decimal datatypes'#3'Top'
+  +#2'M'#5'Width'#2'2'#7'Enabled'#8#8'MaxValue'#2#18#14'ParentShowHint'#8#8'Sho'
+  +'wHint'#9#8'TabOrder'#2#3#0#0#9'TComboBox'#9'cbCharset'#4'Left'#2'e'#6'Heigh'
+  +'t'#2#21#4'Hint'#6'@New field character setIF IT DIFFERS from database chara'
+  +'cter set'#3'Top'#3#224#0#5'Width'#2'|'#7'Enabled'#8#10'ItemHeight'#2#13#8'O'
+  +'nChange'#7#15'cbCharsetChange'#8'TabOrder'#2#8#4'Text'#6#4'NONE'#0#0#6'TLab'
+  +'el'#10'lblCharset'#4'Left'#2#8#6'Height'#2#13#3'Top'#3#228#0#5'Width'#2'&'#7
+  +'Caption'#6#7'Charset'#11'ParentColor'#8#0#0#6'TLabel'#12'lblCollation'#4'Le'
+  +'ft'#2#8#6'Height'#2#13#3'Top'#3#12#1#5'Width'#2')'#7'Caption'#6#9'Collation'
+  +#11'ParentColor'#8#0#0#9'TComboBox'#11'cbCollation'#4'Left'#2'e'#6'Height'#2
+  +#21#4'Hint'#6'<Collation of new field IF IT DIFFERS from database collation'
+  +#3'Top'#3#8#1#5'Width'#2'|'#7'Enabled'#8#10'ItemHeight'#2#13#14'ParentShowHi'
+  +'nt'#8#8'ShowHint'#9#8'TabOrder'#2#9#0#0#0
 ]);

+ 118 - 26
neweditfield.pas

@@ -6,7 +6,7 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls, Spin, Buttons;
+  StdCtrls, Spin, Buttons, turbocommon;
 
 type
   TFormMode = (foNew, foEdit);
@@ -15,6 +15,8 @@ type
 
   TfmNewEditField = class(TForm)
     bbAdd: TBitBtn;
+    cbCharset: TComboBox;
+    cbCollation: TComboBox;
     cbType: TComboBox;
     cxAllowNull: TCheckBox;
     edDescription: TEdit;
@@ -26,11 +28,17 @@ type
     Label4: TLabel;
     Label5: TLabel;
     Label6: TLabel;
+    Label7: TLabel;
+    lblCharset: TLabel;
+    lblCollation: TLabel;
     seSize: TSpinEdit;
     seOrder: TSpinEdit;
+    seScale: TSpinEdit;
     procedure bbAddClick(Sender: TObject);
+    procedure cbCharsetChange(Sender: TObject);
     procedure cbTypeChange(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
+    procedure FormCreate(Sender: TObject);
   private
     FDBIndex: Integer;
     FTableName: string;
@@ -39,14 +47,22 @@ type
     fFormMode: TFormMode;
     OldFieldName: string;
     OldFieldType: string;
-    OldFieldSize: Integer;
+    OldFieldSize: integer;
+    OldFieldScale: integer;
     OldAllowNull: Boolean;
-    OldOrder: Integer;
+    OldOrder: integer;
     OldDefault: string;
+    OldCharacterSet: string;
+    OldCollation: string;
     OldDescription: string;
-    procedure Init(dbIndex: Integer; TableName: string; FormMode: TFormMode;
-      FieldName, FieldType, DefaultValue, Description: string; FSize, FOrder: Integer; AllowNull: Boolean; RefreshButton: TBitBtn);
-
+    procedure Init(dbIndex: Integer; TableName: string;
+      FormMode: TFormMode;
+      FieldName, FieldType,
+      CharacterSet, Collation,
+      DefaultValue, Description: string;
+      Size, Scale, Order: Integer;
+      AllowNull: Boolean;
+      RefreshButton: TBitBtn);
     { public declarations }
   end; 
 
@@ -66,20 +82,25 @@ var
   Clk: TNotifyEvent;
 begin
   if FRefreshButton = nil then
-   clk:= nil
+    clk:= nil
   else
     clk:= FRefreshButton.OnClick;
 
   if fFormMode = foNew then  // New field
   begin
     Line:= cbType.Text;
-    if Pos('CHAR', Line) > 0 then
+    if (Line='CHAR') or
+      (Line='CSTRING') or
+      (Line='VARCHAR') then
       Line:= Line + '(' + IntToStr(seSize.Value) + ')';
 
     // Default value
     if Trim(edDefault.Text) <> '' then
     begin
-      if (Pos('CHAR', cbType.Text) > 0) and (Pos('''', edDefault.Text) = 0) then
+      if ((cbType.Text='CHAR') or
+        (cbType.Text='CSTRING') or
+        (cbType.Text='VARCHAR')) and
+        (Pos('''', edDefault.Text) = 0) then
         Line:= Line + ' default ''' + edDefault.Text + ''''
       else
         Line:= Line + ' default ' + edDefault.Text;
@@ -89,10 +110,12 @@ begin
     if not cxAllowNull.Checked then
       Line:= Line + ' not null';
 
-    fmMain.ShowCompleteQueryWindow(FDBIndex, 'Add new field on Table: ' + FTableName,
-      'ALTER TABLE ' + FTableName + ' ADD ' + edFieldName.Text + ' ' + Line, Clk);
+    fmMain.ShowCompleteQueryWindow(FDBIndex, 'Add new field to Table: ' + FTableName,
+      'ALTER TABLE ' + FTableName +
+      ' ADD ' + edFieldName.Text + ' ' + Line,
+      Clk);
   end
-  else  // Upate
+  else  // Update
   begin
     Line:= '';
     // Check name change
@@ -100,16 +123,29 @@ begin
       Line:= 'ALTER TABLE ' + FTableName + ' ALTER ' + OldFieldName + ' TO ' +
       edFieldName.Text + ';' + LineEnding;
 
-    // check type/size change
-    if (cbType.Text <> OldFieldType) or (seSize.Value <> OldFieldSize) then
+    // Check type/size/scale change
+    if (cbType.Text <> OldFieldType) or
+      (seSize.Value <> OldFieldSize) or
+      (seScale.Value <> OldFieldScale) then
     begin
-      Line:= Line + 'ALTER TABLE ' + FTableName + ' ALTER ' + UpperCase(Trim(edFieldName.Text))
-        + ' TYPE ' + cbType.Text;
-
-      if Pos('CHAR', Line) > 0 then
+      Line:= Line + 'ALTER TABLE ' + FTableName +
+        ' ALTER ' + UpperCase(Trim(edFieldName.Text)) +
+        ' TYPE ' + cbType.Text;
+
+      if (cbType.Text='NUMERIC') or
+       (cbType.Text='DECIMAL') then
+        Line:= Line + '(' + IntToStr(seSize.Value) + ',' +
+          IntToStr(seScale.Value)+');' + LineEnding
+      else
+      if (cbType.Text='CHAR') or
+        (cbType.Text='CSTRING') or
+        (cbType.Text='VARCHAR') then
         Line:= Line + '(' + IntToStr(seSize.Value) + ');' + LineEnding;
     end;
 
+    //todo: deal with character set change when updating field
+    //todo: deal with Collation change when updating field
+
     // Field Order
     if seOrder.Value <> OldOrder then
     begin
@@ -151,9 +187,49 @@ begin
   Close;
 end;
 
+procedure TfmNewEditField.cbCharsetChange(Sender: TObject);
+var
+  Collations: TStringList;
+begin
+  // Available collations depend on the chosen character set, so update that
+  Collations:= TStringList.Create;
+  try
+    GetCollations(cbCharSet.Text,Collations);
+    cbCollation.Items.Assign(Collations);
+  finally
+    Collations.Free;
+  end;
+end;
+
 procedure TfmNewEditField.cbTypeChange(Sender: TObject);
 begin
   seSize.Value:= dmSysTables.GetDefaultTypeSize(FDBIndex, cbType.Text);
+
+  {todo: low priority allow/disallow gui elements when using domain datatypes.
+   Check what can be overridden (e.g. collate for text-type domain fields)}
+  // Allow character set, lblCollation for text type fields; otherwise disable
+  case cbType.Text of
+    'CHAR','CSTRING','VARCHAR':
+    begin
+      // Allow character set/lblCollation for text type fields
+      cbCharset.Enabled:= true;
+      cbCollation.Enabled:= true;
+      seScale.Enabled:= false;
+    end;
+    'DECIMAL','NUMERIC':
+    begin
+      // Allow scale for numeric, decimal
+      seScale.Enabled:= true;
+      cbCharset.Enabled:= false;
+      cbCollation.Enabled:= false;
+    end
+    else
+    begin
+      cbCharset.Enabled:= false;
+      cbCollation.Enabled:= false;
+      seScale.Enabled:= false;
+    end;
+  end;
 end;
 
 procedure TfmNewEditField.FormClose(Sender: TObject;
@@ -162,15 +238,28 @@ begin
   CloseAction:= caFree;
 end;
 
-procedure TfmNewEditField.Init(dbIndex: Integer; TableName: string; FormMode: TFormMode;
-  FieldName, FieldType, DefaultValue, Description: string; FSize, FOrder: Integer; AllowNull: Boolean;
+procedure TfmNewEditField.FormCreate(Sender: TObject);
+begin
+  // Load available character sets
+  // todo: (low priority) character sets should be retrieved from current database server
+  CbCharSet.Items.AddStrings(FBCharacterSets);
+  CbCharSet.ItemIndex:=DefaultFBCharacterSet;
+end;
+
+procedure TfmNewEditField.Init(dbIndex: Integer; TableName: string;
+  FormMode: TFormMode;
+  FieldName, FieldType,
+  CharacterSet, Collation,
+  DefaultValue, Description: string;
+  Size, Scale, Order: integer;
+  AllowNull: Boolean;
   RefreshButton: TBitBtn);
 begin
   cbType.Clear;
-  // Add Basic types
-  dmSysTables.GetBasicTypes(cbType.Items);
 
-  // Add Domain types
+  // Load basic datatypes for fields into combobox....
+  dmSysTables.GetBasicTypes(cbType.Items);
+  // ... add domain types for fields
   dmSysTables.GetDomainTypes(dbIndex, cbType.Items);
 
   FDBIndex:= dbIndex;
@@ -179,11 +268,14 @@ begin
   FRefreshButton:= RefreshButton;
 
   OldFieldName:= FieldName;
-  OldFieldSize:= FSize;
+  OldFieldSize:= Size;
+  OldFieldScale:= Scale;
   OldFieldType:= FieldType;
   OldAllowNull:= AllowNull;
-  OldOrder:= FOrder;
+  OldOrder:= Order;
   OldDefault:= DefaultValue;
+  OldCharacterSet:= CharacterSet;
+  OldCollation:= Collation;
   OldDescription:= Description;
 
   edFieldName.Text:= OldFieldName;
@@ -201,7 +293,7 @@ begin
   else
   begin
     bbAdd.Caption:= 'Add';
-    Caption:= 'Add new in : ' + TableName;
+    Caption:= 'Add new field in : ' + TableName;
   end;
 end;
 

+ 1 - 1
scriptdb.pas

@@ -257,7 +257,7 @@ begin
           end;
 
           // Rudimentary support for array datatypes (only covers 0 dimension types):
-          {todo: expand to proper array type detection (low priority as arrays are
+          {todo: (low priority) expand to proper array type detection though arrays are
            virtually unused}
           if not(FieldByName('array_upper_bound').IsNull) then
             FieldLine:= FieldLine + ' [' + FieldByName('array_upper_bound').AsString + '] ';

+ 21 - 6
systables.pas

@@ -76,13 +76,18 @@ type
     // Get permissions that specified user has for indicated object
     function GetObjectUserPermission(dbIndex: Integer; ObjectName, UserName: string; var ObjType: Integer): string;
 
+    // Add field types into List
     procedure GetBasicTypes(List: TStrings);
+    // Gets domain types; used in addition to basic types for GUI selections
     procedure GetDomainTypes(dbIndex: Integer; List: TStrings);
     function GetDefaultTypeSize(dbIndex: Integer; TypeName: string): Integer;
     function GetDomainTypeSize(dbIndex: Integer; DomainTypeName: string): Integer;
 
-    function GetFieldInfo(dbIndex: Integer; TableName, FieldName: string; var FieldType: string;
-      var FieldSize: Integer; var NotNull: Boolean; var DefaultValue, Description : string): Boolean;
+    function GetFieldInfo(dbIndex: Integer; TableName, FieldName: string;
+      var FieldType: string;
+      var FieldSize: integer; var FieldScale: integer;
+      var NotNull: Boolean;
+      var DefaultValue, CharacterSet, Collation, Description : string): Boolean;
 
     function GetDatabaseInfo(dbIndex: Integer; var DatabaseName, CharSet, CreationDate, ServerTime: string;
       var ODSVerMajor, ODSVerMinor, Pages, PageSize: Integer;
@@ -828,7 +833,10 @@ end;
 
 procedure TdmSysTables.GetBasicTypes(List: TStrings);
 begin
-  List.CommaText:= List.CommaText + 'SMALLINT,INTEGER,BIGINT,VARCHAR,FLOAT,"DOUBLE PRECISION",CHAR,DATE,TIME,' +
+  List.CommaText:= List.CommaText +
+    'SMALLINT,INTEGER,BIGINT,VARCHAR,'+
+    'FLOAT,"DOUBLE PRECISION",DECIMAL,NUMERIC,'+
+    'CHAR,DATE,TIME,' +
     'TIMESTAMP,CSTRING,D_FLOAT,QUAD,BLOB';
 end;
 
@@ -883,8 +891,11 @@ begin
 end;
 
 
-function TdmSysTables.GetFieldInfo(dbIndex: Integer; TableName, FieldName: string; var FieldType: string;
-  var FieldSize: Integer; var NotNull: Boolean; var DefaultValue, Description: string): Boolean;
+function TdmSysTables.GetFieldInfo(dbIndex: Integer; TableName, FieldName: string;
+  var FieldType: string;
+  var FieldSize: integer; var FieldScale: integer;
+  var NotNull: Boolean;
+  var DefaultValue, CharacterSet, Collation, Description : string): Boolean;
 begin
   Init(dbIndex);
   sqQuery.SQL.Text:= 'SELECT r.RDB$FIELD_NAME AS field_name, ' +
@@ -944,9 +955,13 @@ begin
         // Field is based on a domain
         FieldType:= trim(FieldByName('field_source').AsString);
       end;
+      FieldScale:=FieldByName('field_scale').AsInteger;
       NotNull:= FieldByName('field_not_null_constraint').AsString = '1';
+      Collation:= trim(FieldByName('field_collation').AsString);
+      CharacterSet:= trim(FieldByName('field_charset').AsString);
+      // Note: no trim here - defaultvalue could be an empty string
       DefaultValue:= FieldByName('field_default_source').AsString;
-      Description:= FieldByName('field_description').AsString;
+      Description:= trim(FieldByName('field_description').AsString);
     end;
   end;
   sqQuery.Close;

+ 57 - 54
tablemanage.lfm

@@ -25,13 +25,13 @@ object fmTableManage: TfmTableManage
     TabOrder = 0
     object tsFields: TTabSheet
       Caption = 'Fields'
-      ClientHeight = 382
-      ClientWidth = 813
+      ClientHeight = 386
+      ClientWidth = 809
       object sgFields: TStringGrid
         Left = 0
-        Height = 324
+        Height = 328
         Top = 0
-        Width = 813
+        Width = 809
         Align = alTop
         Anchors = [akTop, akLeft, akRight, akBottom]
         ColCount = 7
@@ -80,11 +80,12 @@ object fmTableManage: TfmTableManage
         TabOrder = 0
         TitleFont.Style = [fsBold]
         UseXORFeatures = True
+        OnDblClick = sgFieldsDblClick
       end
       object bbEdit: TBitBtn
         Left = 138
         Height = 49
-        Top = 330
+        Top = 334
         Width = 75
         Anchors = [akLeft, akBottom]
         Caption = 'Edit'
@@ -171,7 +172,7 @@ object fmTableManage: TfmTableManage
       object bbNew: TBitBtn
         Left = 0
         Height = 49
-        Top = 330
+        Top = 334
         Width = 118
         Anchors = [akLeft, akBottom]
         Caption = 'New Field'
@@ -258,7 +259,7 @@ object fmTableManage: TfmTableManage
       object edDrop: TBitBtn
         Left = 225
         Height = 49
-        Top = 330
+        Top = 334
         Width = 75
         Anchors = [akLeft, akBottom]
         Caption = 'Drop'
@@ -268,9 +269,9 @@ object fmTableManage: TfmTableManage
         TabOrder = 3
       end
       object bbRefresh: TBitBtn
-        Left = 718
+        Left = 714
         Height = 49
-        Top = 330
+        Top = 334
         Width = 94
         Anchors = [akRight, akBottom]
         Caption = 'Refresh'
@@ -282,11 +283,11 @@ object fmTableManage: TfmTableManage
     end
     object tsIndices: TTabSheet
       Caption = 'Indices'
-      ClientHeight = 382
-      ClientWidth = 813
+      ClientHeight = 386
+      ClientWidth = 809
       ImageIndex = 2
       object bbRefreshIndices: TBitBtn
-        Left = 616
+        Left = 612
         Height = 43
         Top = 4
         Width = 88
@@ -301,7 +302,7 @@ object fmTableManage: TfmTableManage
         Left = -1
         Height = 139
         Top = -2
-        Width = 606
+        Width = 602
         Anchors = [akTop, akLeft, akRight]
         Columns = <        
           item
@@ -337,7 +338,7 @@ object fmTableManage: TfmTableManage
         TabOrder = 1
       end
       object bbDrop: TBitBtn
-        Left = 616
+        Left = 612
         Height = 40
         Top = 51
         Width = 88
@@ -425,11 +426,11 @@ object fmTableManage: TfmTableManage
       end
       object GroupBox1: TGroupBox
         Left = -2
-        Height = 236
+        Height = 240
         Top = 139
         Width = 607
         Anchors = [akTop, akLeft, akBottom]
-        ClientHeight = 218
+        ClientHeight = 222
         ClientWidth = 603
         TabOrder = 3
         object GroupBox2: TGroupBox
@@ -460,24 +461,24 @@ object fmTableManage: TfmTableManage
           end
           object edIndexName: TEdit
             Left = 125
-            Height = 27
+            Height = 21
             Top = 39
             Width = 150
             TabOrder = 1
           end
           object Label3: TLabel
             Left = 9
-            Height = 18
+            Height = 13
             Top = 44
-            Width = 111
+            Width = 79
             Caption = 'New index name'
             ParentColor = False
           end
           object cxUnique: TCheckBox
             Left = 9
-            Height = 24
+            Height = 17
             Top = 77
-            Width = 87
+            Width = 65
             Caption = 'Is Unique'
             TabOrder = 2
           end
@@ -513,25 +514,25 @@ object fmTableManage: TfmTableManage
           end
           object Label1: TLabel
             Left = 9
-            Height = 18
+            Height = 13
             Top = 12
-            Width = 33
+            Width = 24
             Caption = 'Type'
             ParentColor = False
           end
           object Label4: TLabel
             Left = 12
-            Height = 18
+            Height = 13
             Top = 109
-            Width = 63
+            Width = 42
             Caption = 'Direction'
             ParentColor = False
           end
           object Label2: TLabel
             Left = 318
-            Height = 18
+            Height = 13
             Top = 12
-            Width = 176
+            Width = 128
             Caption = 'Create new index on fields'
             ParentColor = False
           end
@@ -548,13 +549,13 @@ object fmTableManage: TfmTableManage
     end
     object tsConstraints: TTabSheet
       Caption = 'Constraints'
-      ClientHeight = 382
-      ClientWidth = 813
+      ClientHeight = 386
+      ClientWidth = 809
       ImageIndex = 3
       object bbRefreshConstraint: TBitBtn
-        Left = 697
+        Left = 693
         Height = 43
-        Top = 338
+        Top = 342
         Width = 99
         Anchors = [akRight, akBottom]
         Caption = 'Refresh'
@@ -565,9 +566,9 @@ object fmTableManage: TfmTableManage
       end
       object sgConstraints: TStringGrid
         Left = -1
-        Height = 333
+        Height = 337
         Top = -1
-        Width = 815
+        Width = 811
         Anchors = [akTop, akLeft, akRight, akBottom]
         ColCount = 7
         Columns = <        
@@ -608,7 +609,7 @@ object fmTableManage: TfmTableManage
       object bbNewConstraint: TBitBtn
         Left = 6
         Height = 43
-        Top = 338
+        Top = 342
         Width = 144
         Anchors = [akLeft, akBottom]
         Caption = 'New Constraint'
@@ -695,7 +696,7 @@ object fmTableManage: TfmTableManage
       object bbDropConstraint: TBitBtn
         Left = 160
         Height = 43
-        Top = 338
+        Top = 342
         Width = 75
         Anchors = [akLeft, akBottom]
         Caption = 'Drop'
@@ -707,14 +708,14 @@ object fmTableManage: TfmTableManage
     end
     object tsTriggers: TTabSheet
       Caption = 'Triggers'
-      ClientHeight = 382
-      ClientWidth = 813
+      ClientHeight = 386
+      ClientWidth = 809
       ImageIndex = 1
       object sgTriggers: TStringGrid
         Left = 0
-        Height = 324
+        Height = 328
         Top = -1
-        Width = 795
+        Width = 791
         Anchors = [akTop, akLeft, akRight, akBottom]
         ColCount = 2
         Columns = <        
@@ -732,11 +733,12 @@ object fmTableManage: TfmTableManage
         Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect, goSmoothScroll]
         RowCount = 2
         TabOrder = 0
+        OnDblClick = sgTriggersDblClick
       end
       object bbRefreshTriggers: TBitBtn
-        Left = 708
+        Left = 704
         Height = 46
-        Top = 332
+        Top = 336
         Width = 87
         Anchors = [akRight, akBottom]
         Caption = 'Refresh'
@@ -748,7 +750,7 @@ object fmTableManage: TfmTableManage
       object bbNewTrigger: TBitBtn
         Left = 6
         Height = 46
-        Top = 332
+        Top = 336
         Width = 126
         Anchors = [akLeft, akBottom]
         Caption = 'New Trigger'
@@ -835,7 +837,7 @@ object fmTableManage: TfmTableManage
       object bbEditTrigger: TBitBtn
         Left = 150
         Height = 46
-        Top = 332
+        Top = 336
         Width = 75
         Anchors = [akLeft, akBottom]
         Caption = 'Edit'
@@ -922,7 +924,7 @@ object fmTableManage: TfmTableManage
       object bbDropTrigger: TBitBtn
         Left = 231
         Height = 46
-        Top = 332
+        Top = 336
         Width = 75
         Anchors = [akLeft, akBottom]
         Caption = 'Drop'
@@ -934,14 +936,14 @@ object fmTableManage: TfmTableManage
     end
     object tsPermissions: TTabSheet
       Caption = 'Permissions'
-      ClientHeight = 382
-      ClientWidth = 813
+      ClientHeight = 386
+      ClientWidth = 809
       ImageIndex = 4
       object sgPermissions: TStringGrid
         Left = 0
-        Height = 324
+        Height = 328
         Top = -3
-        Width = 812
+        Width = 808
         Anchors = [akTop, akLeft, akRight, akBottom]
         ColCount = 12
         Columns = <        
@@ -1005,11 +1007,12 @@ object fmTableManage: TfmTableManage
         Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect, goSmoothScroll]
         RowCount = 2
         TabOrder = 0
+        OnDblClick = sgPermissionsDblClick
       end
-      object edEditPermission: TBitBtn
+      object bbEditPermission: TBitBtn
         Left = 174
         Height = 50
-        Top = 326
+        Top = 330
         Width = 75
         Anchors = [akLeft, akBottom]
         Caption = 'Edit'
@@ -1090,13 +1093,13 @@ object fmTableManage: TfmTableManage
           FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
           FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
         }
-        OnClick = edEditPermissionClick
+        OnClick = bbEditPermissionClick
         TabOrder = 1
       end
       object bbRefreshPermissions: TBitBtn
-        Left = 699
+        Left = 695
         Height = 50
-        Top = 326
+        Top = 330
         Width = 87
         Anchors = [akRight, akBottom]
         Caption = 'Refresh'
@@ -1108,7 +1111,7 @@ object fmTableManage: TfmTableManage
       object bbAddUser: TBitBtn
         Left = 0
         Height = 50
-        Top = 326
+        Top = 330
         Width = 158
         Anchors = [akLeft, akBottom]
         Caption = 'Add User / Role'

Разница между файлами не показана из-за своего большого размера
+ 481 - 480
tablemanage.lrs


+ 39 - 8
tablemanage.pas

@@ -34,7 +34,7 @@ type
     cbSortType: TComboBox;
     clbFields: TCheckListBox;
     cxUnique: TCheckBox;
-    edEditPermission: TBitBtn;
+    bbEditPermission: TBitBtn;
     edDrop: TBitBtn;
     edIndexName: TEdit;
     GroupBox1: TGroupBox;
@@ -78,9 +78,12 @@ type
     procedure bbRefreshReferencesClick(Sender: TObject);
     procedure cbIndexTypeChange(Sender: TObject);
     procedure edDropClick(Sender: TObject);
-    procedure edEditPermissionClick(Sender: TObject);
+    procedure bbEditPermissionClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+    procedure sgFieldsDblClick(Sender: TObject);
+    procedure sgPermissionsDblClick(Sender: TObject);
+    procedure sgTriggersDblClick(Sender: TObject);
   private
     FDBIndex: Integer;
     FTableName: string;
@@ -129,26 +132,52 @@ begin
   end;
 end;
 
+procedure TfmTableManage.sgFieldsDblClick(Sender: TObject);
+begin
+  // Double clicking on a row lets you edit the field
+  bbEditClick(Sender);
+end;
+
+procedure TfmTableManage.sgPermissionsDblClick(Sender: TObject);
+begin
+  // Double clicking allows user to edit permissions
+  bbEditPermissionClick(Sender);
+end;
+
+procedure TfmTableManage.sgTriggersDblClick(Sender: TObject);
+begin
+  // Double clicking allows user to edit trigger
+  bbEditTriggerClick(Sender);
+end;
+
 
 procedure TfmTableManage.bbEditClick(Sender: TObject);
 var
   fmNewEditField: TfmNewEditField;
-  FieldName, FieldType, DefaultValue, Description: string;
-  FieldOrder, FieldSize: Integer;
+  FieldName, FieldType,
+  DefaultValue, Characterset, Collation, Description: string;
+  FieldOrder, FieldSize, FieldScale: Integer;
   AllowNull: Boolean;
 begin
   fmNewEditField:= TfmNewEditField.Create(nil);
+  {todo: getting info from gui elements that got it from a function that got it
+   from a query is awful. Rework to use e.g. the function}
   with sgFields, fmNewEditField do
   begin
+    Characterset:= ''; //todo: support character set in field editing!!!
+    Collation:= ''; //todo: support collation
     FieldName:= Cells[1, Row];
     FieldType:= Cells[2, Row];
     FieldSize:= StrtoInt(Cells[3, Row]);
+    FieldScale:= -13; //todo support fieldscale in field editing!!!
     AllowNull:= Boolean(StrToInt(Cells[4, Row]));
     DefaultValue:= Cells[5, Row];
     Description:= Cells[6, Row];
     FieldOrder:= Row;
-    fmNewEditField.Init(FDBIndex, FTableName, foEdit, FieldName, FieldType, DefaultValue, Description, FieldSize,
-      FieldOrder, AllowNull, bbRefresh);
+    fmNewEditField.Init(FDBIndex, FTableName, foEdit,
+      FieldName, FieldType, Characterset, Collation,
+      DefaultValue, Description,
+      FieldSize, FieldScale, FieldOrder, AllowNull, bbRefresh);
 
     Caption:= 'Edit field: ' + OldFieldName;
 
@@ -290,7 +319,9 @@ begin
   fmNewEditField:= TfmNewEditField.Create(nil);
   with fmNewEditField do
   begin
-    Init(FDBIndex, FTableName, foNew, '', '', '', '', 0, 0, True, bbRefresh);
+    Init(FDBIndex, FTableName, foNew,
+      '', '', '', '', '', '',
+      0, 0, 0, True, bbRefresh);
     Caption:= 'Add new field to Table: ' + FTableName;
     Show;
   end;
@@ -406,7 +437,7 @@ begin
   end;
 end;
 
-procedure TfmTableManage.edEditPermissionClick(Sender: TObject);
+procedure TfmTableManage.bbEditPermissionClick(Sender: TObject);
 var
   fmPermissions: TfmPermissionManage;
   UserType: Integer;

+ 180 - 4
turbocommon.pas

@@ -1,7 +1,7 @@
 unit turbocommon;
 
-{ Non-GUI common code for TurboBird }
-
+{ Non-GUI common code for TurboBird that do not depend on a database connection.
+SysTables covers functionality for which a db connection is required. }
 {$mode objfpc}{$H+}
 
 interface
@@ -20,7 +20,8 @@ const
   // Available character set encodings for Firebird.
   // Update this whenever Firebird supports new character sets
   DefaultFBCharacterSet=42; //Used for GUI controls etc. UTF8 in CharacterSets below.
-  FBCharacterSets: array[1..52] of string =
+  // Available character sets as per Firebird 2.5
+  FBCharacterSets: array[0..51] of string =
     ('NONE',
     'ASCII',
     'BIG_5',
@@ -73,6 +74,163 @@ const
     'WIN1256',
     'WIN1257',
     'WIN1258');
+  // Available collations as per Firebird 2.5
+  // Pairs of collation names and the character set name
+  // that must be used to support this collation
+  FBCollations: array[0..148-1,0..1] of string =
+    (
+    ('ASCII','ASCII'),
+    ('BIG_5','BIG_5'),
+    ('BS_BA','WIN1250'),
+    ('CP943C','CP943C'),
+    ('CP943C_UNICODE','CP943C'),
+    ('CS_CZ','ISO8859_2'),
+    ('CYRL','CYRL'),
+    ('DA_DA','ISO8859_1'),
+    ('DB_CSY','DOS852'),
+    ('DB_DAN865','DOS865'),
+    ('DB_DEU437','DOS437'),
+    ('DB_DEU850','DOS850'),
+    ('DB_ESP437','DOS437'),
+    ('DB_ESP850','DOS850'),
+    ('DB_FIN437','DOS437'),
+    ('DB_FRA437','DOS437'),
+    ('DB_FRA850','DOS850'),
+    ('DB_FRC850','DOS850'),
+    ('DB_FRC863','DOS863'),
+    ('DB_ITA437','DOS437'),
+    ('DB_ITA850','DOS850'),
+    ('DB_NLD437','DOS437'),
+    ('DB_NLD850','DOS850'),
+    ('DB_NOR865','DOS865'),
+    ('DB_PLK','DOS852'),
+    ('DB_PTB850','DOS850'),
+    ('DB_PTG860','DOS860'),
+    ('DB_RUS','CYRL'),
+    ('DB_SLO','DOS852'),
+    ('DB_SVE437','DOS437'),
+    ('DB_SVE850','DOS850'),
+    ('DB_TRK','DOS857'),
+    ('DB_UK437','DOS437'),
+    ('DB_UK850','DOS850'),
+    ('DB_US437','DOS437'),
+    ('DB_US850','DOS850'),
+    ('DE_DE','ISO8859_1'),
+    ('DOS437','DOS437'),
+    ('DOS737','DOS737'),
+    ('DOS775','DOS775'),
+    ('DOS850','DOS850'),
+    ('DOS852','DOS852'),
+    ('DOS857','DOS857'),
+    ('DOS858','DOS858'),
+    ('DOS860','DOS860'),
+    ('DOS861','DOS861'),
+    ('DOS862','DOS862'),
+    ('DOS863','DOS863'),
+    ('DOS864','DOS864'),
+    ('DOS865','DOS865'),
+    ('DOS866','DOS866'),
+    ('DOS869','DOS869'),
+    ('DU_NL','ISO8859_1'),
+    ('EN_UK','ISO8859_1'),
+    ('EN_US','ISO8859_1'),
+    ('ES_ES','ISO8859_1'),
+    ('ES_ES_CI_AI','ISO8859_1'),
+    ('EUCJ_0208','EUCJ_0208'),
+    ('FI_FI','ISO8859_1'),
+    ('FR_CA','ISO8859_1'),
+    ('FR_FR','ISO8859_1'),
+    ('FR_FR_CI_AI','ISO8859_1'),
+    ('GB18030','GB18030'),
+    ('GB18030_UNICODE','GB18030'),
+    ('GBK','GBK'),
+    ('GBK_UNICODE','GBK'),
+    ('GB_2312','GB_2312'),
+    ('ISO8859_1','ISO8859_1'),
+    ('ISO8859_13','ISO8859_13'),
+    ('ISO8859_2','ISO8859_2'),
+    ('ISO8859_3','ISO8859_3'),
+    ('ISO8859_4','ISO8859_4'),
+    ('ISO8859_5','ISO8859_5'),
+    ('ISO8859_6','ISO8859_6'),
+    ('ISO8859_7','ISO8859_7'),
+    ('ISO8859_8','ISO8859_8'),
+    ('ISO8859_9','ISO8859_9'),
+    ('ISO_HUN','ISO8859_2'),
+    ('ISO_PLK','ISO8859_2'),
+    ('IS_IS','ISO8859_1'),
+    ('IT_IT','ISO8859_1'),
+    ('KOI8R','KOI8R'),
+    ('KOI8R_RU','KOI8R'),
+    ('KOI8U','KOI8U'),
+    ('KOI8U_UA','KOI8U'),
+    ('KSC_5601','KSC_5601'),
+    ('KSC_DICTIONARY','KSC_5601'),
+    ('LT_LT','ISO8859_13'),
+    ('NEXT','NEXT'),
+    ('NONE','NONE'),
+    ('NO_NO','ISO8859_1'),
+    ('NXT_DEU','NEXT'),
+    ('NXT_ESP','NEXT'),
+    ('NXT_FRA','NEXT'),
+    ('NXT_ITA','NEXT'),
+    ('NXT_US','NEXT'),
+    ('OCTETS','OCTETS'),
+    ('PDOX_ASCII','DOS437'),
+    ('PDOX_CSY','DOS852'),
+    ('PDOX_CYRL','CYRL'),
+    ('PDOX_HUN','DOS852'),
+    ('PDOX_INTL','DOS437'),
+    ('PDOX_ISL','DOS861'),
+    ('PDOX_NORDAN4','DOS865'),
+    ('PDOX_PLK','DOS852'),
+    ('PDOX_SLO','DOS852'),
+    ('PDOX_SWEDFIN','DOS437'),
+    ('PT_BR','ISO8859_1'),
+    ('PT_PT','ISO8859_1'),
+    ('PXW_CSY','WIN1250'),
+    ('PXW_CYRL','WIN1251'),
+    ('PXW_GREEK','WIN1253'),
+    ('PXW_HUN','WIN1250'),
+    ('PXW_HUNDC','WIN1250'),
+    ('PXW_INTL','WIN1252'),
+    ('PXW_INTL850','WIN1252'),
+    ('PXW_NORDAN4','WIN1252'),
+    ('PXW_PLK','WIN1250'),
+    ('PXW_SLOV','WIN1250'),
+    ('PXW_SPAN','WIN1252'),
+    ('PXW_SWEDFIN','WIN1252'),
+    ('PXW_TURK','WIN1254'),
+    ('SJIS_0208','SJIS_0208'),
+    ('SV_SV','ISO8859_1'),
+    ('TIS620','TIS620'),
+    ('TIS620_UNICODE','TIS620'),
+    ('UCS_BASIC','UTF8'),
+    ('UNICODE','UTF8'),
+    ('UNICODE_CI','UTF8'),
+    ('UNICODE_CI_AI','UTF8'),
+    ('UNICODE_FSS','UNICODE_FSS'),
+    ('UTF8','UTF8'),
+    ('WIN1250','WIN1250'),
+    ('WIN1251','WIN1251'),
+    ('WIN1251_UA','WIN1251'),
+    ('WIN1252','WIN1252'),
+    ('WIN1253','WIN1253'),
+    ('WIN1254','WIN1254'),
+    ('WIN1255','WIN1255'),
+    ('WIN1256','WIN1256'),
+    ('WIN1257','WIN1257'),
+    ('WIN1257_EE','WIN1257'),
+    ('WIN1257_LT','WIN1257'),
+    ('WIN1257_LV','WIN1257'),
+    ('WIN1258','WIN1258'),
+    ('WIN_CZ','WIN1250'),
+    ('WIN_CZ_CI_AI','WIN1250'),
+    ('WIN_PTBR','WIN1252')
+    );
+
+// Retrieve available collations for specified Characterset into Collations
+function GetCollations(const Characterset: string; var Collations: TStringList): boolean;
 
 // Given field retrieval query in FieldQuery, return field type and size.
 // Includes support for field types that are domains and arrays
@@ -92,6 +250,24 @@ procedure SetTransactionIsolation(Params: TStringList);
 
 implementation
 
+function GetCollations(const Characterset: string; var Collations: TStringList): boolean;
+var
+  i: integer;
+begin
+  result:= false;
+  Collations.Clear;
+  Collations.BeginUpdate;
+  for i:= low(FBCollations) to high(FBCollations) do
+  begin
+    if FBCollations[i,1]=Characterset then
+    begin
+      Collations.Add(FBCollations[i,0]);
+    end;
+  end;
+  Collations.EndUpdate;
+  result:= true;
+end;
+
 procedure SetTransactionIsolation(Params: TStringList);
 begin
   Params.Clear;
@@ -102,7 +278,7 @@ end;
 
 procedure GetFieldType(FieldQuery: TSQLQuery; var FieldType: string; var FieldSize: integer);
 // Requires FieldQuery to be the correct field retrieval query.
-// todo: migrate field retrieval query to turbocommon
+// todo: migrate field retrieval query to systables if not already done
 begin
   FieldType:= '';
   FieldSize:= 0;

Некоторые файлы не были показаны из-за большого количества измененных файлов