mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Try to fix issue #1188: weird values in collation pulldown inside the text editor. Could it be that TField.AsString is broken if this heals the problem.
This commit is contained in:
@ -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;
|
||||
|
@ -347,7 +347,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
TabOrder = 0
|
||||
OnChange = editNumEditChange
|
||||
end
|
||||
object comboCollation: TComboBox
|
||||
object comboCollation: TTntComboBox
|
||||
Left = 354
|
||||
Top = 3
|
||||
Width = 119
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user