Thread View: borland.public.jbuilder.database
4 messages
4 total messages
Started by Michael Aresti
Fri, 25 Aug 2006 14:47
Database synchronization
Author: Michael Aresti
Date: Fri, 25 Aug 2006 14:47
Date: Fri, 25 Aug 2006 14:47
10 lines
1356 bytes
1356 bytes
My application is working with MySQL Server. Using it I can modify every row in some special schema in database. Suppose that my program is running and I am only viewing query response (for example "select * from employees") and somebody else using MySQL Query Browser is making some changes in that table (deleting few rows). My question is: is there enabled any kind of synchronization that I can use in my program (if something is changing in tables in database it will inform my program about it). I want that using my program I will view always the most actual results.
Re: Database synchronization
Author: Kevin Dean [TeamB]
Date: Fri, 25 Aug 2006 17:30
Date: Fri, 25 Aug 2006 17:30
32 lines
2529 bytes
2529 bytes
Michael Aresti wrote: >My application is working with MySQL Server. Using it I can modify every >row in some special schema in database. Suppose that my program is running >and I am only viewing query response (for example "select * from >employees") and somebody else using MySQL Query Browser is making some >changes in that table (deleting few rows). > >My question is: is there enabled any kind of synchronization that I can >use in my program (if something is changing in tables in database it will >inform my program about it). I want that using my program I will view >always the most actual results. No. The work others do is isolated from you until you requery the database. Some databases have callback APIs to inform you of record changes (or you can build them yourself on a table-by-table basis if you have to) but they're tricky to implement. If you have a table that is constantly changing for which you have to see the latest changes, the best bet is usually just to refresh the dataset on some kind of timer. -- Kevin Dean [TeamB] Dolphin Data Development Ltd. http://www.datadevelopment.com/ NEW WHITEPAPERS Team Development with JBuilder and Borland Enterprise Server Securing Borland Enterprise Server http://www.datadevelopment.com/papers/index.html Please see Borland's newsgroup guidelines at http://info.borland.com/newsgroups/guide.html
Re: Database synchronization
Author: Paul Nichols [TeamB]
Date: Fri, 01 Sep 2006 15:11
Date: Fri, 01 Sep 2006 15:11
11 lines
1463 bytes
1463 bytes
Michael Aresti wrote: > My question is: is there enabled any kind of synchronization that I can > use in my program (if something is changing in tables in database it > will inform my program about it). I want that using my program I will > view always the most actual results. Kevin's answer is the only one that I know of that will work. In addition, each update, insert, or delete could have a change/auditing table associated with it with a timestamp. That way, you could use a threaded call to see what rows need to be updated in the refresh, if any.
Re: Database synchronization
Author: Michael Aresti
Date: Sat, 02 Sep 2006 13:49
Date: Sat, 02 Sep 2006 13:49
12 lines
1603 bytes
1603 bytes
Paul Nichols [TeamB] wrote: > Kevin's answer is the only one that I know of that will work. In > addition, each update, insert, or delete could have a change/auditing > table associated with it with a timestamp. That way, you could use a > threaded call to see what rows need to be updated in the refresh, if any. Thanks for help. Your both answers are very good explanation of problem I wanted to resolve. But I also think that at present my Java programing skills are insufficiently to this alone... so I decided to change the "Transaction Isolation" level to TRANSACTION_REPEATABLE_READ. This way nobody else can make any changes in database tables and I have always the most actual data.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads