aber wie kann ich den progressBar in den code hier einbauen?
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43:
| procedure TForm1.Button1Click(Sender: TObject);
begin wwQuery1.First;
while not wwQuery2.Eof do begin wwQuery2.Delete; end; while not wwQuery1.Eof do begin if (wwQuery1.FieldByName('KNUMMER').IsNull) or (wwQuery2.Locate('KdNr',wwQuery1.FieldByName('KNUMMER').AsString,[])) then Memo1.Lines.add( wwQuery1.FieldByName('KNUMMER').AsString + ' ' + wwQuery1.FieldByName('KNAME1').AsString)
else begin wwQuery2.Insert; wwQuery2.FieldByName('KdNr').AsString:= wwQuery1.FieldByName('KNUMMER').AsString; wwQuery2.FieldByName('Name1').AsString:=wwQuery1.FieldByName('KNAME1').AsString; wwQuery2.FieldByName('Name2').AsString:=wwQuery1.FieldByName('KNAME2').AsString; wwQuery2.FieldByName('Strasse').AsString:=wwQuery1.FieldByName('KSTRASSE').AsString; wwQuery2.FieldByName('PLZ').AsString:=wwQuery1.FieldByName('KPLZ').AsString; wwQuery2.FieldByName('Postfach').AsString:=wwQuery1.FieldByName('KPOSTFACH').AsString; wwQuery2.FieldByName('PLZPostfach').AsString:=wwQuery1.FieldByName('KPOSTFPLZ').AsString; wwQuery2.FieldByName('Ort').AsString:=wwQuery1.FieldByName('KORT').AsString; wwQuery2.FieldByName('Telefon').AsString:=wwQuery1.FieldByName('KTELEFON').AsString; wwQuery2.FieldByName('Telefax').AsString:=wwQuery1.FieldByName('KTELEFAX').AsString; wwQuery2.FieldByName('KonPers').AsString:=wwQuery1.FieldByName('KPNAME1').AsString; wwQuery2.FieldByName('Bank').AsString:=wwQuery1.FieldByName('KBANK').AsString; wwQuery2.FieldByName('KontoNr').AsInteger:=wwQuery1.FieldByName('KKTONR').AsInteger; wwQuery2.FieldByName('BLZ').AsString:=wwQuery1.FieldByName('KBLZ').AsString; wwQuery2.FieldByName('E_Mail').AsString:=wwQuery1.FieldByName('KEMAIL').AsString; wwQuery2.Post; end; wwQuery1.Next; end; end; end; end; end. |
wenn ich den vor die schleife setze, läuft er immer wieder die 1 datenbank durch.
-------------------------------------
-------------------------------------