• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

change in db to our webapplication

 
Pradeep allada
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to write code for changes occured in the data base to our web application automatically when we open.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34656
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradeep,
Are you asking about how a web page can automatically know when the database changes? If so, you'd have to poll using AJAX or page refreshes.
 
Pradeep allada
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thak you for the reply Jeanne Boyarsky

k I will post it in AJAX.
In my project I have an administrator who can modify total db.
and some clients who can modify their own database.

how can a client know that changes done by the administrator without his permission.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34656
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AJAX wouldn't help with that because the client isn't online. I can think of a few approaches:

1) Have a last modified user/time on each row and show the user a list of changes since last login made by the admin.
2) Set up an e-mail notification when the admin changes things.
3) Manually have the admin tell the client when something has changed.
 
Pradeep allada
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:

1) Have a last modified user/time on each row and show the user a list of changes since last login made by the admin.


k, do we have to use triggers here or else any other option is there?

or
can we get any benefit by using log files?

if yes, how?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34656
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradeep mca wrote:k, do we have to use triggers here or else any other option is there?

YOu can just do a query when the user logs in to see what records have changed. The alternative is to store changes as they happen in a log table, but that's not necessary.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic