IBTable / IBQuery / IBDataSET hepsi ile ayrı ayrı denememe ve normal prosedüre göre yazmış olmama rağmen sorunu çözemedim.
Olayın hikayesi şu

DataModule de IBDatabase ve IBTransaction uygun şekilde ekli ve birbirine bağlı. Detay tablodaki bilgileri kayıt sonunda Master tablo (ama master-detail bağlantı yok) nun afterpostunda;
Kod: Tümünü seç
IBTransaction1.CommitRetaining;
Stok_Hareket tablosu bir de Stok_Hareket_Detay tablosu var. Tarih, hareket_tipi vs. alanlar ilk tabloda hareket satırları da ikinci tabloda tutuluyor. Fis_No alanı ortak.
İkinci bir defa bu fişi düzeltmeye/kayıtı değiştirmeye çalıştığımda bilgileri grid e okuyor. kaydet deyince öncelikle eski bilgileri siliyor. Fakat veritabanından sildiği halde program bunu farkedemiyor ve sanırım cache den aynı bilgileri tekrarlayıp getiriyor.
Olayı çözmek için http://www.tamaracka.com da aşağıdaki cevabı buldum;
Burada anladığım kadarıyla commit de demek gerekiyormuşHi Gregor,
> What is the real differece between Commit and CommitRetaining?
> Because, in some discusions there tells that i better to use Commit insted
> of CommitRetaining... why??
CommitRetaining keeps the cursors (related to that transaction) open and
doesn't end the transaction. If you use CommitRetaining, you need to
Commit too.
Commit closes the cursors and ends the transaction.
>Because i would like to keep my database open,
> but Commit close the database!!
No it doesn't. It closes the open cursors _linked_ to that transaction.
--
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com

Hatalı tercume olabilir ??
Ben de aynı AfterPost u;
Kod: Tümünü seç
procedure TDM.tblStok_HareketAfterPost(DataSet: TDataSet);
begin // post ve delete de..
IBTransaction1.CommitRetaining;
IBTransaction1.Commit;
end;
Neticede hikaye biraz uzun oldu ya, klasik sözdür; anlıyan beri gelsin

Gerçi uzun hikaye konusunda rekoru kıracağımı da pek sanmıyorum
