Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Junk data Display on Page Load

Junk data Display on Page Load

Scheduled Pinned Locked Moved C#
csharpdatabaseasp-nethelp
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Devkranth Kishore Vanja
    wrote on last edited by
    #1

    Hi Everybody We have one Asp.net application developed using framework 2.0 with C#,Sql and AJAX. The application is running live from past 2 years almost. All the times users will be facing kind of strange problem, reporting some junk data will be displayed on the browser some times. When they refresh the page or reopen the browser, it will display the correct information. For Eg. We have a stored procedure which returns months between 2 dates, if we pass 2 dates as '01/04/2010' and '30/06/2010' then procedure will return 'APR,MAY,JUN'. One case we have noticed where it has returned and displayed as MAY,JUN,JUL,AUG which is not possible. Once we refresh or reopen the page it displays the correct information. This is one ex. whereas we have some other page also where we get unwanted values like that. If any one has come across such scenario ever, let me know what could be the problem and solution for this. :( :( :(

    L B 2 Replies Last reply
    0
    • D Devkranth Kishore Vanja

      Hi Everybody We have one Asp.net application developed using framework 2.0 with C#,Sql and AJAX. The application is running live from past 2 years almost. All the times users will be facing kind of strange problem, reporting some junk data will be displayed on the browser some times. When they refresh the page or reopen the browser, it will display the correct information. For Eg. We have a stored procedure which returns months between 2 dates, if we pass 2 dates as '01/04/2010' and '30/06/2010' then procedure will return 'APR,MAY,JUN'. One case we have noticed where it has returned and displayed as MAY,JUN,JUL,AUG which is not possible. Once we refresh or reopen the page it displays the correct information. This is one ex. whereas we have some other page also where we get unwanted values like that. If any one has come across such scenario ever, let me know what could be the problem and solution for this. :( :( :(

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      devkranth wrote:

      which is not possible.

      Well, it evidently is possible... Are you saying that it is data returned from this SP that is apparently wrong - or are their other areas on the page that may be wrong? It sounds to me like a caching issue, maybe? Like, maybe an earlier call to the SP returned the May_Aug list and it is being displayed from a cache? Using Ajax I have had situations where the customer shows me screens which show incorrect data - which turns out to be something that hasn't finished refreshing through an Ajax call; in this instance I changed the display to be hidden while updating, so it was clear what was happening when the Ajax call was slow.

      ___________________________________________ .\\axxx (That's an 'M')

      D 1 Reply Last reply
      0
      • L Lost User

        devkranth wrote:

        which is not possible.

        Well, it evidently is possible... Are you saying that it is data returned from this SP that is apparently wrong - or are their other areas on the page that may be wrong? It sounds to me like a caching issue, maybe? Like, maybe an earlier call to the SP returned the May_Aug list and it is being displayed from a cache? Using Ajax I have had situations where the customer shows me screens which show incorrect data - which turns out to be something that hasn't finished refreshing through an Ajax call; in this instance I changed the display to be hidden while updating, so it was clear what was happening when the Ajax call was slow.

        ___________________________________________ .\\axxx (That's an 'M')

        D Offline
        D Offline
        Devkranth Kishore Vanja
        wrote on last edited by
        #3

        Thanks Maxxx Yes, there could be other area on the page also where it is possible. There is no possiblity of SP returning May_Aug through earlier call as there is no pro data available for this. Only APR-JUN , APR-SEP or JAN-MAR is possible. For this particular page as it is being used for printing information we have not used AJAX.This problem is reported by the user rarely so it is very difficult to trace out. The doubt what i have..Can sql responce be modified through network or any other source?

        1 Reply Last reply
        0
        • D Devkranth Kishore Vanja

          Hi Everybody We have one Asp.net application developed using framework 2.0 with C#,Sql and AJAX. The application is running live from past 2 years almost. All the times users will be facing kind of strange problem, reporting some junk data will be displayed on the browser some times. When they refresh the page or reopen the browser, it will display the correct information. For Eg. We have a stored procedure which returns months between 2 dates, if we pass 2 dates as '01/04/2010' and '30/06/2010' then procedure will return 'APR,MAY,JUN'. One case we have noticed where it has returned and displayed as MAY,JUN,JUL,AUG which is not possible. Once we refresh or reopen the page it displays the correct information. This is one ex. whereas we have some other page also where we get unwanted values like that. If any one has come across such scenario ever, let me know what could be the problem and solution for this. :( :( :(

          B Offline
          B Offline
          Bernhard Hiller
          wrote on last edited by
          #4

          Could there be some internationalization issue? Date formats vary terribly, and some systems do inconsistent conversions. Could you show us your function for getting the month names? That could help to figure out what is going wrong.

          D 1 Reply Last reply
          0
          • B Bernhard Hiller

            Could there be some internationalization issue? Date formats vary terribly, and some systems do inconsistent conversions. Could you show us your function for getting the month names? That could help to figure out what is going wrong.

            D Offline
            D Offline
            Devkranth Kishore Vanja
            wrote on last edited by
            #5

            Well Thanks Bernhard .This is my Procedure Wat i Have Written ALTER Procedure[dbo].[sp_ListofMonths] @FrmDate varchar(20), @ToDate varchar(20) AS Begin set dateformat dmy; declare @dateDiff int, @mon int, @year int, @Tmon int, @TYear int, @i int set @mon = month(@FrmDate); set @year = year(@FrmDate); set @Tmon = month(@ToDate); set @TYear = year(@ToDate); set @dateDiff = datediff(m,@FrmDate,@ToDate) set @i = 0; delete from tblMonthList; while(@i <= @dateDiff) begin if(@year <= @TYear) if(@mon != 13) begin insert into tblMonthList(mon,yer) values (@mon,@year) set @mon = @mon + 1; set @i = @i + 1; end else begin set @mon = 1; set @year = @year+1; end end select CASE mon WHEN 1 then 'JAN' WHEN 2 then 'FEB' WHEN 3 then 'MAR' WHEN 4 then 'APR' WHEN 5 then 'MAY' WHEN 6 then 'JUN' WHEN 7 then 'JUL' WHEN 8 then 'AUG' WHEN 9 then 'SEP' WHEN 10 then 'OCT' WHEN 11 then 'NOV' ELSE 'DEC' END, mon,yer from tblMonthList end exec sp_ListofMonths '01/04/2010','30/06/2010'

            B 1 Reply Last reply
            0
            • D Devkranth Kishore Vanja

              Well Thanks Bernhard .This is my Procedure Wat i Have Written ALTER Procedure[dbo].[sp_ListofMonths] @FrmDate varchar(20), @ToDate varchar(20) AS Begin set dateformat dmy; declare @dateDiff int, @mon int, @year int, @Tmon int, @TYear int, @i int set @mon = month(@FrmDate); set @year = year(@FrmDate); set @Tmon = month(@ToDate); set @TYear = year(@ToDate); set @dateDiff = datediff(m,@FrmDate,@ToDate) set @i = 0; delete from tblMonthList; while(@i <= @dateDiff) begin if(@year <= @TYear) if(@mon != 13) begin insert into tblMonthList(mon,yer) values (@mon,@year) set @mon = @mon + 1; set @i = @i + 1; end else begin set @mon = 1; set @year = @year+1; end end select CASE mon WHEN 1 then 'JAN' WHEN 2 then 'FEB' WHEN 3 then 'MAR' WHEN 4 then 'APR' WHEN 5 then 'MAY' WHEN 6 then 'JUN' WHEN 7 then 'JUL' WHEN 8 then 'AUG' WHEN 9 then 'SEP' WHEN 10 then 'OCT' WHEN 11 then 'NOV' ELSE 'DEC' END, mon,yer from tblMonthList end exec sp_ListofMonths '01/04/2010','30/06/2010'

              B Offline
              B Offline
              Bernhard Hiller
              wrote on last edited by
              #6

              What about two (or even more) users accessing tblMonthList at the same time? That would surely result in junk data.

              D 1 Reply Last reply
              0
              • B Bernhard Hiller

                What about two (or even more) users accessing tblMonthList at the same time? That would surely result in junk data.

                D Offline
                D Offline
                Devkranth Kishore Vanja
                wrote on last edited by
                #7

                There is no possiblity of SP returning May_Aug through earlier call as there is no pro data available for this. Only APR-JUN , APR-SEP or JAN-MAR is possible. Moreover we are facing this junk data problem only for this report (where we have used one temp table tblMonthList) but other places on page load we face this issue. We are facing this issue on couple of other applications also which is hosted on the same server.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups