1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Stale values returned by ajax

Discussion in 'C#' started by Sleeping Troll, Jul 22, 2008.

  1. #1
    I am having trouble with an ajax call, the server side code runs fine when accessed directly, This is the server side code:

    Set rs=Server.CreateObject("ADODB.RecordSet")
    rs.CursorType = 3
    rs.CursorLocation = 3
    rs.ActiveConnection = conn
    rs.open ("SELECT top 1 time FROM calls INNER JOIN cliente INNER JOIN p1 ON cliente.id_cli = p1.clie INNER JOIN p2 ON p1.id_p1 = p2.p1 INNER JOIN p3 ON p2.id_p2 = p3.p2 INNER JOIN p4 ON p3.id_p3 = p4.p3 ON calls.number = p4.c2 WHERE(cliente.id_cli = 30) order by time desc")
    Resp = rs.fields("time")
    Set rs = nothing
    Code (markup):
    When called by Ajax script it returns "stale" values
    For example if a new record is inserted in database it will still return value of an older record. This only occurs when script is called from client.
    Sleeping Troll, Jul 22, 2008 IP
  2. itcn

    itcn Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    If the ASP page works fine when called directlty, it is probably a cache problem in your browser (IE is notorious for this when working with Ajax). Try clearing your cache and restarting the browser.
    itcn, Jul 28, 2008 IP