Autor Beitrag
j-a-n@gmx.de
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84


Delphi 7
BeitragVerfasst: Fr 27.08.04 15:52 
Hallo
Hab jetzt mein erstes Delphi-Programm geschrieben und hab gleich nen problem.
Mein Proggi synchonisiert zwei Paradox-Tabellen, legt also viele Datensätze an bzw. ändert diese.
Dummerweise hält das Programm nach ner viertelstunde einfach an (ohne Fehlermeldung). Mir ist aufgefallen, dass dei pdoxusrs.lck riesig gross wird (18 MB!).
Grundsätzlich mache ich das so:

- TTable.Create
- active := true
- Append / edit
- Datenzuweisung über FieldAsName('...').AsString := ...
- post
- active := false
- Destroy

Ist irgendwas falsch oder hab ich was vergessen?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 27.08.04 19:19 
Steht das Post innerhalb oder außerhalb deiner Schleife, in der du Append\Edit aufrufst?

Jedes Append\Edit MUSS ein Post haben. Ansonsten bleiben die Daten noch im Cache.

Zum Synchronisieren von Tabellen bieten sich auch manchmal TBatchMove-Komponenten an (in Kombi mit TQuery\TTable).

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
j-a-n@gmx.de Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84


Delphi 7
BeitragVerfasst: Sa 28.08.04 21:15 
Ja, der ganze Block steht so in einer schleife drin, die jeden "quelldatensatz" (auch per TTable) durch geht.

Ich bin froh, dass ich überhaupt das zum laufen gekiegt habe. Batchmove habe ich noch nie gehört und bin daher nicht auf die Idee gekommen. Ich mache aber auch keine Synchonisiererei, sondern Ändere und Bearbeite die Daten noch ein bischen.

Mittlerweile läuft das Programm auch 30 Minuten. Er hat scheinbar nur beim Anlegen von Datensätzen Probleme, beim Updaten läuft es tadellos.

any hints?

Danke & Gruss
Jan