Thema: Delphi SQL-String zu lang ?

Einzelnen Beitrag anzeigen

Hansa

Registriert seit: 9. Jun 2002
Ort: Saarland
7.554 Beiträge
 
Delphi 8 Professional
 
#19

Re: SQL-String zu lang ?

  Alt 25. Feb 2008, 16:16
Er soll das schon so machen (siehe Delphi-Hilfe) :

Delphi-Quellcode:
var

  StringList: TStrings;
begin
  StringList := TStringList.Create;
  try
    with StringList do begin
      Add('This example uses A string List.');
      Add('It is the easiest way to add strings');
      Add('to a combobox''s list of strings.');
      Add('Always remember TStrings.Create method');
      Add('is abstract; So use TStringList.Create');
      Add('method instead.');
    end;
    with ComboBox1 do begin
      Width := 210;
      Items.Assign(StringList);
      ItemIndex := 0;
    end;
  finally
    StringList.free;
  end;
end;
Der Rückgabewert ist hier wohl uninteressant. Also ist in diesem Fall Append = Add.

Zitat:
Rufen Sie Add auf, wenn am Ende der Liste ein String hinzugefügt werden soll. Add gibt den Index des neuen Strings zurück.
Gruß
Hansa
  Mit Zitat antworten Zitat