Oohh! WHILEOPT. Forgot about that one.

Easy fix. See if it resolves issue.


-----Original Message-----
 From: Dennis McGrath <[email protected]>
 To: [email protected] (RBASE-L Mailing List)
 Date: Wed, 31 Oct 2012 14:06:18 -0500
 Subject: [RBASE-L] - RE: While loops



Also, any variables define by the form should be predefined outside the 
while loop.

 

Alternately, for this while loop, you can SET WHILEOPT OFF.

This will solve any problems with variables.

And, since this loop does not have to be screaming fast, you probably will 
see not differnec in performance.

 

 


Dennis McGrath

Software Developer

QMI Security Solutions

1661 Glenlake Ave

Itasca IL 60143

630-980-8461

[email protected]



From: [email protected] [mailto:[email protected]] On Behalf Of Buddy
Sent: Wednesday, October 31, 2012 1:56 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: While loops

 

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 

&n bsp; 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
&nb sp;        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