Einzelnen Beitrag anzeigen

oakley

Registriert seit: 15. Aug 2005
287 Beiträge
 
#1

rückmeldung von access, gibts sowas?

  Alt 19. Okt 2006, 16:42
Datenbank: Access • Version: 2003 • Zugriff über: ADO
Hi, ich habe ein kleines (naja mittelschweres) Problem...

Ich habe eine Accessdatenbank, in die ich ein paar Datensätze per Schleife reinschreibe.

Sieht wie folgt aus:

Delphi-Quellcode:
For i := 1 to Form2.WKGRID1.RowCount-2 do
begin
Form2.ADOCommand1.CommandText := 'INSERT INTO ' + Form6.NAME.Text + ' (ID, ARTIKELNR, ARTIKELTEXT, MENGE, EPREIS, GPREIS, UVP, VERFUEGBAR, FREITEXT) VALUES (''' + InttoStr(i) + ''', ''' + Form2.WKGRID1.Cells[1,i] + ''', ''' + Form2.WKGRID1.Cells[2,i] + ''', ''' + Form2.WKGRID1.Cells[3,i] + ''', ''' + Form2.WKGRID1.Cells[4,i] + ''', ''' + Form2.WKGRID1.Cells[5,i] + ''', ''' + Form2.WKGRID1.Cells[6,i] + ''', ''' + Form2.WKGRID1.Cells[7,i] + ''', ''' + Form2.WKGRID1.Cells[8,i] + ''')';
Form2.ADOCommand1.Execute;
end;
Ich möchte nun wissen, wann Access das letzte INSERT eingefügt hat, damit danach eine andere Aktion starten kann.

Access ist ja bekanntlich nicht die schnellste DB und daher muß ich warten bis alle INSERTS geschrieben sind.

Oder hat jemand ne bessere IDee wie man das hinbekommt als auf ne Rückmeldung von Access zu warten, falls es sowas überhaupt gibt.

Gruß

Mirko
  Mit Zitat antworten Zitat