Hi, People!

Not knowing exactly the correct procedure for doing this, I have 
non-the-less found that doing a "saverow" before all rowlock/updates and 
nextrow/prevrow cycling seems to help.

you may want to try the following, it doesn't blow up on me...

---------------------------------------------------------------------------------------------------------------

I use the following in a tiered region form where I do some conditional 
updates:

--**( UpdPres.enp
--**(   An field entry procedure used to update a bunch of fields if 
"present" was chosen in the 'Result' field.
--**(   GotReslt.enp is an enrty procedure in the "Result" field that 
performs a playback
--**(   filling in the transaction "result"  chosen from a list, then skips 
to this field if it is "present"
--**(   pJO# is a stored Joborder number. pCHOICE is the "passed" 
result.
--**(   vTRANSID is the transacion row ID.  I also "type" my "passed" vars 
even though they
--**(    already exist --to prevent an unnatural RBASE death, in case they 
get "lost" somehow

set err mes off
set mes off
set echo off

set var vTRANSID int
set var pCHOICE text
set var pJO# int
set var vJO# int

IF pCHOICE cont  'PRESENT' then
--  clear var vSTRING, pCHOICE
   cls
    set var vblk text = ' '
   set var vSTRING    text

   cls

--LABEL JTOP
  choose vSTRING fro #values FOR ((LJS(Company,20)) & .vblk & .vblk  +
  & (FORMAT(JO#,'00000')) & .vblk & .vblk & .vblk & (LJS (TitleJ, 15)) +
  & .vblk & .vblk & .vblk & (LJS (ReqText, 30)) ), JO#  fro JobOrder +
  whe JO# in (Select JO# from Joborder whe status = 'open') +
  order by company, JO# at 7 1 Footing Title 'Open Joborders' +
  caption 'Which joborder did you present to the candidate? ' lines 20

         If vSTRING contains '[' then
         --**(that is,  [ESC]
          goto JEND
          ENDIf

         If vSTRING fails then
         --**(somehow, a null value got in the table
         goto JEND
         ENDIf

  set var vJO#   int      = .vSTRING
  set var pJO#   int      = .vSTRING
         --*(this is to change the stored JO# to the one just picked.
         --**( I clear all vVARS, vars that start with "v"

         If vJO# > 1 then
         set err mes off
         set mes off

         set var vCONTID# int = ContID#     in   Joborder where JO# = .pJO#
         set var vCOID#      int = CoID#        in       Joborder where JO# 
= .pJO#
         set var vTITLEJ     text = TitleJ        in      Joborder where 
JO# = .pJO#
         set var vCLIAM      text = AM            in     Joborder where JO# 
= .pJO#
         set var vCLICOM   text = Company   in   Joborder where JO# = .pJO#
         set var vFIRSTNCC text = FirstN      in  Contact   where ContID# = 
.vCONTID#
         set var vLASTCC     text = LastName in   Contact   where ContID# = 
.vCONTID#

         --**(NOTE NOTE NOTE--  I did a saverow before I brought up this 
transaction form
         --**( in anticipation of the following rowlock/updates
         set rowlocks on

            update Transtab set Results      = .pCHOICE   where TransID = 
.vTRANSID
            update Transtab set CliCom       = .vCLICOM   where TransID = 
.vTRANSID
            update Transtab set JO#            = .pJO#    where TransID = 
.vTRANSID
            update Transtab set ContID#     = .vCONTID#   where TransID = 
.vTRANSID
            update Transtab set CCoID#      = .vCOID#     where TransID = 
.vTRANSID
           update Transtab set TITLEJJ     = .vTITLEJ     where TransID = 
.vTRANSID
            update Transtab set CliAM         = .vCLIAM   where TransID = 
.vTRANSID
            update Transtab set CliFirst        = .vFIRSTNCC      where 
TransID = .vTRANSID
            update Transtab set CliLastN     = .vLASTCC   where TransID = 
.vTRANSID

         set rowlocks off

         saverow

         nextrow
         prevrow

         ENDIf

set error mes off
set messages off
set echo off
ENDIF
--------------------------------------------------------------------------------------

Ike
Voodoo Coder
--***(***********************************************************************************************************************
At 12:58 PM 6/15/01 -0400, you wrote:
>Oma:
>
> >Using the EEP command in a region, I've found that you have to have a
> >conditional statement in your eep to recognize the end of data set has
> >occurred because if there is no nextrow or previous row to goto, depending
> >on which direction you are going, it will fail and give you an error
>code.<
>
>I assume you're saying to only do a 'nextrow' if you are NOT on the last
>row in the region?  How could you test for this while in the form?  Even if
>you had an autonumber column you couldn't test for the last autonumber
>because you could have inserted another row farther up in the region.
>
>In older versions, I would do a 'nextrow' and test an error variable to see
>whether I should do a 'prevrow' to move back into the row.  I have found
>that
>the 'nextrow' usually gives me the 'insufficient memory' error even if
>there
>was a next row to go to so the error isn't that I was on the last row.
>
>Razzak:
>
> >Use the Pre-Defined Action to be Executed for Push-Button
> >functions such as, Next Row and Previous Rows.
>
>Unfortunately I need nextrow/prevrow function from within a field's
>eep, not a push button.  When I do use push buttons, I do use the
>pre-defined functions.
>
>
>
>
>Karen

Reply via email to