Hi comrades.

As requested I have posted the 'dodgy' section of code (see below).
There are 3 counter variables used within this section of the method
(doGet()) that are all defined at the class level (i.e. right after the
Class definition, what I would refer to as global variables). I'm fairly
sure I have tried defining them locally with no change in the bug (though I
may be mistaken here as I've tried a lot of things over the last week or
so). The counter variables are PlotsDrawn, TotalPlotsDrawn,
TotalScreensDrawn. The variable that seems to change 'at will' is the
'PlotsDrawn' one. The variable 'Plots' is hardcoded a value of 3.

Hopefully someone can finally suggest the cause of this bug.

Many thanks yet again in anticipation.

Regards,   Billy Graham.


==================================

for (int a=0; a< userDepartmentsNo; a++){
    for (int b=0; b< userAnalysersNo; b++){
        for (int c=0; c< userControlsNo; c++){
            for (int d=0; d< userTestsNo; d++){


 mysqlStatement = "SELECT [Dept], [Anal], [Material], [Date], [Time], " +
                  "[Test], [Result], format(Results.[Date],'dd'), " +
                  "[Id], [BatchNo], [TargetValue], [SD], [Units], " +
                  "format(Results.[Date],'dd/mm/yy'), format(Results.[Time],
'hh:mm') " +
                  "FROM [Results] " +
                  "WHERE [Id] in " +
                  "(SELECT TOP " + (VerticalDivisions + 2) + " [Id] " +
                  "FROM [Results] WHERE ([Dept] = '" + userDepartments[a] +
"') " +
                  "AND ([Anal] = '" + userAnalysers[b] + "') " +
                  "AND ([Material] = '" + userControls[c] + "') " +
                  "AND ([Test] = '" + userTests[d] + "') " +
                  "ORDER by [Date] DESC, [Time] ASC) ORDER by [Date] ASC,
[Time] ASC";

               try {
                    rs = stmt.executeQuery(mysqlStatement);

                    if (rs.next()){
                       PlotsDrawn++;
                       drawLJPlot(out, rs, TotalScreensDrawn, PlotsDrawn,
PlotStyleInUse, PlotX1, PlotY1, PlotX2, PlotY2);
                       ScreenNeedsClosed = true;
                       PlotY1 = PlotY2;
                       PlotY2 = PlotY2 + PlotYSpace;
                       TotalPlotsDrawn ++;
                       }
                   }
                catch (Exception e)
                   {
                    out.println(e);
                   }


             if (PlotsDrawn >= Plots){

              //Draw the navigational controls
                drawNavigationalControls(TotalScreensDrawn, out, (PlotX2 -
GraphRightBorder), 0, PlotX2, ScreenHeightY);

              //Close the SVG Screen Object
                out.println("</g>");
                ScreenNeedsClosed = false;

              //Reset the plotting co-ordinates
                PlotX1 = 0;
                PlotY1 = 0;
                PlotX2 = ScreenWidthX;
                PlotY2 = PlotY1 + PlotYSpace;

              //Increment or reset any counters
                PlotsDrawn = 0;
                TotalScreensDrawn++;
                PlotStyleInUse = "&hiddenPlot;";}

             } // End For 4
          } // End For 3
       } // End For 2
    } // End For 1

=====================================================


-----Original Message-----
From: Geeta Ramani [mailto:[EMAIL PROTECTED]]
Sent: 19 September 2001 15:36
To: [EMAIL PROTECTED]
Subject: Re: Inconsistent behaviour in Servlet output


Billy,

Maybe now would be a good time to post some code..?!
(:-)

Geeta
*****************************************************************

This email has been Virus Scanned.

Privileged/Confidential Information and/or Copyright Material may
be contained in this e-mail. The information and Material is
intended for the use of the intended addressee. If you are not
the intended addressee, or the person responsible for delivering
it to the intended addressee, you may not copy or deliver it to
anyone else or use it in any unauthorised manner. To do so is
prohibited and may be unlawful. If you receive this e-mail by
mistake, advise the sender immediately by using the reply
facility in your e-mail software.


Thank you.
Information Technology Department
Belfast City Hospital Trust

*****************************************************************

Reply via email to