diff --git a/source/main.pas b/source/main.pas index cf5a03ec..ba514317 100644 --- a/source/main.pas +++ b/source/main.pas @@ -860,7 +860,7 @@ type function GetRegKeyTable: String; procedure SaveListSetup( List: TVirtualStringTree ); procedure RestoreListSetup( List: TVirtualStringTree ); - function GetCollations(Items: TStrings = nil): TDataset; + function GetCollations(Items: TWideStrings = nil): TDataset; procedure SetEditorTabCaption(Editor: TFrame; ObjName: WideString); end; @@ -8842,7 +8842,7 @@ begin end; -function TMainform.GetCollations(Items: TStrings = nil): TDataset; +function TMainform.GetCollations(Items: TWideStrings = nil): TDataset; begin // Return cached collation list, used in several places, e.g. table editor if (dsCollations = nil) or (dsCollations.State = dsInactive) then @@ -8851,7 +8851,7 @@ begin dsCollations.First; if Assigned(Items) then begin while not dsCollations.Eof do begin - Items.Add(dsCollations.FieldByName('Collation').AsString); + Items.Add(dsCollations.FieldByName('Collation').AsWideString); dsCollations.Next; end; dsCollations.First; diff --git a/source/table_editor.dfm b/source/table_editor.dfm index 5418eab2..da0b8ae6 100644 --- a/source/table_editor.dfm +++ b/source/table_editor.dfm @@ -347,7 +347,7 @@ object frmTableEditor: TfrmTableEditor TabOrder = 0 OnChange = editNumEditChange end - object comboCollation: TComboBox + object comboCollation: TTntComboBox Left = 354 Top = 3 Width = 119 diff --git a/source/table_editor.pas b/source/table_editor.pas index 85c26531..94f61d07 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -35,7 +35,7 @@ type memoUnionTables: TTntMemo; comboInsertMethod: TComboBox; lblCollation: TLabel; - comboCollation: TComboBox; + comboCollation: TTNTComboBox; lblEngine: TLabel; comboEngine: TComboBox; treeIndexes: TVirtualStringTree; @@ -259,7 +259,7 @@ begin engine := ds.FieldByName(DBO_TYPE).AsString; comboEngine.ItemIndex := comboEngine.Items.IndexOf(engine); if ds.FindField(DBO_COLLATION) <> nil then - comboCollation.ItemIndex := comboCollation.Items.IndexOf(ds.FieldByName(DBO_COLLATION).AsString); + comboCollation.ItemIndex := comboCollation.Items.IndexOf(ds.FieldByName(DBO_COLLATION).AsWideString); editAutoInc.Text := ds.FieldByName(DBO_AUTOINC).AsString; editAvgRowLen.Text := ds.FieldByName(DBO_AVGROWLEN).AsString; comboRowFormat.ItemIndex := comboRowFormat.Items.IndexOf(ds.FieldByName(DBO_ROWFORMAT).AsString); @@ -448,7 +448,7 @@ begin ds := Mainform.GetCollations; while not ds.Eof do begin if ds.FieldByName('Collation').AsWideString = comboCollation.Text then begin - Specs.Add('CONVERT TO CHARSET '+ds.FieldByName('Charset').AsString); + Specs.Add('CONVERT TO CHARSET '+ds.FieldByName('Charset').AsWideString); break; end; ds.Next; @@ -994,7 +994,7 @@ begin 8: begin // Collation pulldown EnumEditor := TEnumEditorLink.Create; EnumEditor.ValueList := TWideStringList.Create; - Mainform.GetCollations(TStrings(EnumEditor.ValueList)); + Mainform.GetCollations(EnumEditor.ValueList); EditLink := EnumEditor; end; 6: begin