SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard boxhead's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,040
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is going on!!!!

    Code:
    'response.Write(Recordset_mem.Fields.Item("NominalAddedBy").value)
    
    modDate = Recordset_mem.Fields.Item("NominalModifiedDate").value
    addBy = Recordset_mem.Fields.Item("NominalAddedBy").value
    
    response.Write(addBy)
    If i run this i get nothing (not first response is commented out)
    if i comment out the modDate i get the addBy value
    if i uncomment the first response i get the same value twice
    if i comment out the first response and the modDate line the second response works!!

    What the hell am i doing?!!!!!!!!!!!!!

    cheers

    monkey
    monkey - the rest is history

  2. #2
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    357
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Check the rest of your code for any 'on error resume next' statement and comment any out. Then you can see what the error is, on error resume next will just continue running your code even if there is an error and you never see the error message.

    One common problem is a misspelled column name or the column name is different in the database than in your code.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I can't see anything off hand that would mess this up however I have found that sometimes recordset items get flaky if you try to use them inline so I usually stuff them into an array to pull out later.

    Have you tried this?

    Code:
    'response.Write(Recordset_mem.Fields.Item("NominalAddedBy").value)
    
    addBy = Recordset_mem.Fields.Item("NominalAddedBy").value
     modDate = Recordset_mem.Fields.Item("NominalModifiedDate").value
    
    response.Write(addBy)
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  4. #4
    SitePoint Wizard boxhead's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,040
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have no On Error Resume Next code so that doesn't help!

    I have noticed other strange goings on on other pages:

    Code:
    <%=(rs.Fields.Item("area").Value)%><a href="results.asp?id=<%=(rs.Fields.Item("id").Value)%>)"><%=(rs.Fields.Item("area").Value)%></a>
    this displays the area twice - the second being a link

    Code:
    <a href="results.asp?id=<%=(rs.Fields.Item("id").Value)%>)"><%=(rs.Fields.Item("area").Value)%></a>
    this displays nothing but if i look at the source code the link is created with no text!!

    WHAT THE HELL IS GOING ON!!!!!
    monkey - the rest is history

  5. #5
    SitePoint Guru
    Join Date
    Jun 2007
    Posts
    689
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I get start getting unexpected / inconsistent results I sometimes find this to be a browser problem.

    Depending on what the code is doing, firefox will sometimes display a local cache file instead of the current dynamic content.

    The only way to see changes or refresh the page in firefox is to use ctrl+shift+R key combination OR shift + click the reload button.

    Simply doing a "reload" doesn't actually refresh the page content. Also using cache expiration tags, serverside or client side, will not affect firefox for local cache files.

    Another way is to change the url string from say default.asp to default.asp?x=1, where the value of x must be different each time to see something which is not in the cache.

    Or you can completely clear the local cache each time

    If not using firefox check your browser settings to insure a refresh is actually occurring on each page load.

  6. #6
    SitePoint Wizard boxhead's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,040
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by webber123456 View Post
    When I get start getting unexpected / inconsistent results I sometimes find this to be a browser problem.

    Depending on what the code is doing, firefox will sometimes display a local cache file instead of the current dynamic content.

    The only way to see changes or refresh the page in firefox is to use ctrl+shift+R key combination OR shift + click the reload button.

    Simply doing a "reload" doesn't actually refresh the page content. Also using cache expiration tags, serverside or client side, will not affect firefox for local cache files.

    Another way is to change the url string from say default.asp to default.asp?x=1, where the value of x must be different each time to see something which is not in the cache.

    Or you can completely clear the local cache each time

    If not using firefox check your browser settings to insure a refresh is actually occurring on each page load.
    This didn't work on IE of firefox! cheers anyway
    monkey - the rest is history

  7. #7
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Yes but... Have you tried this?

    Code:
    'response.Write(Recordset_mem.Fields.Item("NominalAddedBy").value)
    
    addBy = Recordset_mem.Fields.Item("NominalAddedBy").value
     modDate = Recordset_mem.Fields.Item("NominalModifiedDate").value
    
    response.Write(addBy)
    I've reversed your second and third line to see if it makes a difference.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

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