Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh data problem 1

Status
Not open for further replies.

Oppenhiemer

Programmer
Jun 28, 2001
315
GB
Hi -

Recently just noticed a problem when it comes to data being refreshed across network when changes are made to data.

I am using Delphi 6, the generic Interbase components (TIBDatabase and TIBDataset for editing records)and Firebird.

While running 2 clients on the same network, I noticed that the other clients do not see changes made to the data. I am using CommitRetaining when posting changes (because the user selects a record for editing from a DBGrid - and I would like to retain a cursor to the record being edited.)

I have created events in Interbase and respective alert components in the App itself. These KNOW that data has changed (using the messageBeep(0) function as a debug aid.) However, when I go to edit a record after changes have been made in another client - these changes are not always visible.

I know that closing the database component and then re-opening it can cause changes to be seen, but is there not a more elegant solution ? After all - it undermines the use of CommitRetaining to retain the current view of the data.

I would have thought that calling the Refresh method of TIBDataset would be a more appropriate method - but this does not seem to work in that way.

Anyway, any help would be greatly appreciated.

Cheers..

Opp.
 
Hi Opp.
I suggest you to check the params that are set in your IBTransaction component.
You need to pick 'Read committed' option in the special dialg window or simply insert these params into IBTransaction.Params

read_committed
rec_version
nowait

And after that you will see COMMITTED chages made by other users after refreshing your dataset.
lasta.
 
Thanks Lasta, that seems to work! Shame these properties are not surfaced out at the component level - may have saved myself a lot of time.

Anyway, thanks for your help - you been a great help.

Cheers..

Opp.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top