Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004

    Unanswered: Update a div with the data just inserted in a database

    I have a classic asp page that I need to update a div when creating a record in a table in the database. The database is in sql server 2000 and it has a table with telephone calls. When a phone is ringing then a record is created and I want to update the div with the phone number. The only way that I think is using triggers but how?

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    You don't want to use a trigger. Triggers are a database level object and impact data only. It will not prompt your front-end (ASP) to do anything differently.

    You want to write a query along the lines of
    FROM   dbo.telephone_calls
        BY date_created DESC
    You then want to use ASP to return the result of this query to your site.

    If you need to do this automagically then you need to look at automatically refreshing the ASP page or look in to AJAX.
    Home | Blog

  3. #3
    Join Date
    Feb 2004
    thanks for your response,
    I expect something more sophisticated... I explain:
    I thought about ajax but ajax does not have to do with real time updates except if I periodically issue an ajax request to the server. To simulate real time I have to issue an ajax request every 1 sec or less (but still not real time!). Ajax has the feature to issue periodically request (from what I know). But this is not my choice because it will overkill network traffic and database server... Imagine if we have 100 or 1.000 users (or more) issue a query to the database server every 1 sec... And if we think that many times the query does not have anything for the station issued the request then we have an absolute madness!!! Consume resources unnecessarily
    I searched the internet and I found that there are some techniques under those names:
    Comet or reverse ajax. These techniques are used from gmail and facebook to post real time notifications. For example to notify us that a new e-mail has been arrived WITHOUT a periodically ajax requests from the client-browser. This is amazing...
    Thanks anyway

  4. #4
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Before you go down the long, painful path involved with push notifications in Classic ASP...

    Are you stuck using 13 year old technology or do you have the option to look at things that will do this for you out of the box?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Feb 2004

    Red face Yes I have stuck with ASP classic

    Yes I have stuck with ASP classic. This is the only choice for me to build server side web applications. Do not ask why. Currently to learn a new language as C# (.NET) for example is more time consuming. Besides the application that I want to add this functionality is made in classic ASP!!
    But for what I know until now about push notifications to the browser has nothing to do with ASP or another server side programming. So I do not think that classic ASP create any type of limitations.
    Thanks for your reply...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts