Jan

  I would suggest not setting the datatype of variable inside of a while
loop.

 

   SET VAR vBreak INT = 0

 

WHILE .

  SET VAR vBreak = 0 

  EDIT USI ..

 

ENDWHILE

 

If the two variables (vWODataRow and vCountBothRows) are set before the
while loop why not try 

EDI USI  WorkOrderDataRow WHERE WorkOrderTID BETWEEN vWoDataRow AND
vCountBothRows

 

Buddy

 

 

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of jan johansen
Sent: Wednesday, October 31, 2012 2:40 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - While loops

 

Group,

 

There was a discussion a few weeks back about WHILE loops.

 

I have a routine that "partially broke" a few 9.1 updates ago.

I figure it is some sort of memory blow up.

 

Here is the code

 

   WHILE vWODataRow <= .vCountBothRows THEN
      SET VAR vBreak INT = 0
      EDIT USING WorkOrderDataRow WHERE WorkOrderTID = .vWODataRow +
         CAPTION '   Incoming Data Entry '
      IF vBreak <> 0 THEN
         BREAK
      ENDIF
      SET VAR vWODataRow = (.vWODataRow +1)
      PROPERTY Measurements REFRESHLIST 'TRUE'
   ENDWHILE

 

Most of the time this works fine because the while loop is under 50
itterations.

But if there are 200 itterations to go through, the system will lock up.

 

Any ideas?

 

This is the reason I'm playing around with a DB-Grid. I rarely use this tool
so

am a bit unfamiliar.

 

Jan

Reply via email to