| Author |
change in db to our webapplication
|
Pradeep allada
Greenhorn
Joined: Jul 28, 2011
Posts: 17
|
|
how to write code for changes occured in the data base to our web application automatically when we open.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26173
|
|
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.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Pradeep allada
Greenhorn
Joined: Jul 28, 2011
Posts: 17
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26173
|
|
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
Joined: Jul 28, 2011
Posts: 17
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26173
|
|
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.
|
 |
 |
|
|
subject: change in db to our webapplication
|
|
|