Hi Robert
Danke... Habs so hin bekommen:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
ListItem : TlistItem;
begin
dbMain.Host:=edServer.Text; //Server
dbMain.Login:=edLogin.Text; //Benutzername
dbMain.Password:=edPassword.Text; //Passwort
dbMain.Database:=edDB.Text; //Name der Datenbank
dbMain.Connected:=True; //Verbindung herstellen
lvAnzeige.Items.Clear;
try
qrMain.SQL.Text:='SELECT * FROM `table_ordertracking` WHERE `Customer_Number` like '''+edknr.Text+'''"%" and `Order_Number` like '''+edatnr.Text+'''"%" ORDER BY `Order_Number`;';
qrMain.Open;
qrMain.FieldByName('Order_Type').AsString;
while not qrMain.Eof do
begin
ListItem := lvAnzeige.Items.Add;
ListItem.Caption:=qrMain.FieldByName('Order_Type').AsString;
ListItem.SubItems.Add(qrMain.FieldByName('Customer_Number').AsString);
ListItem.SubItems.Add(qrMain.FieldByName('Order_Number').AsString);
ListItem.SubItems.Add(qrMain.FieldByName('First_Event').AsString);
ListItem.SubItems.Add(qrMain.FieldByName('PrePrint').AsString);
ListItem.SubItems.Add(qrMain.FieldByName('Print').AsString);
ListItem.SubItems.Add(qrMain.FieldByName('BMSLogout').AsString);
qrMain.Next;
end;
finally
dbMain.Connected:=False; //Verbindung trennen
end;
end;
Gruß CelinaW