• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

change in db to our webapplication

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to write code for changes occured in the data base to our web application automatically when we open.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic