Junk data Display on Page Load
-
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. :( :( :(
-
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. :( :( :(
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')
-
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')
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?
-
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. :( :( :(
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.
-
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.
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'
-
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'
What about two (or even more) users accessing tblMonthList at the same time? That would surely result in junk data.
-
What about two (or even more) users accessing tblMonthList at the same time? That would surely result in junk data.
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.