Doug,

Do you have this one resolved?

Jan
 


-----Original Message-----
From: Doug Hamilton <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Mon, 28 Mar 2011 19:19:33 -0600
Subject: [RBASE-L] - RE: Can't read updated table column


Thanks Steve - I had RECALC VARIABLE in another place and I think I got 
an "Obsolete command" message, or maybe it was RECALC TABLES.
I'll try the RECALC VARS again.
I had PROPERTY TABLE...REFRESH, but that didn't seem to help, I think 
because this is a variable form with no driving table and R:Docs says 
"Refetches data from the database to update a dataset’s view of data." 
Sounds tempting but I'm not sure it's applicable. Of course, I could be 
wrong.

Thanks again.
Doug

Steve Vellella wrote:
> Doug,
>
> Have you tried issuing a RECALC VARIABLE command or a PRORERTY TABLE
> tablename 'refresh' in your custom code when that menu selection is
> selected.
>
> Steve
>
> Steve Vellella
> Office: 520-498-2256
> Cell: 520-250-6498
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Doug
> Hamilton
> Sent: Monday, March 28, 2011 4:52 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Can't read updated table column
>
> Hi List, I need some help.
> Situation: I need to lock additional users from using a menu item if one 
> user is already using that item.
>
> Solution: When the menu item is selected by the first user, a CONTROL 
> table is UPDATEd with the name of that 1st computer using that menu item.
> Subsequent users then know who is running that menu item.
> When the first user finishes, the CONTROL table is updated with 
> 'Unlocked' so others can use the menu item.
> The code is below.  It works, 1st computer gets into the menu item, 2nd 
> computer gets the message that Computer1 is using the menu item. 
> Then, Computer 1 exits the menu item. 
>
> Problem: computer 2 still gets the message that Computer 1 is using the 
> menu item after CONTROL has been UPDATEd to "Unlock'.
> CONTROL table is updated properly along the way and the code runs 
> properly in RB Editor, but doesn't run in the form.
> The form is a variable menu form with a Group Bar; the code runs as 
> custom code for an item in a group.
> Tracing the code, variable vBatesNbrLock does not get 'Unlocked' 
> SELECTed into it even thought that's the value in the CONTROL table.
>
> R:Base 7.6 30119 
> Any ideas?
> TIA
> Doug
>
>
>
> SET VAR +
>   vBatesNbr INTEGER, +
>   vBatesNbrLock TEXT, +
>   vivBatesLock INTEGER
>
> ----Test for Bates number being locked by a user
> SELECT BatesNbrLock INTO vBatesNbrLock INDICATOR vivBatesLock  +
>  FROM Control  +
>  WHERE ControlDescr = 'Data'
>
> IF vBatesNbrLock = 'Unlocked' THEN
>   UPDATE Control  +
>     SET BatesNbrLock = .pComputer +
>    WHERE ControlDescr = 'Data'
> ELSE
>   SET V vMsg TEXT = +
>     ('Receipts are being entered on computer' & .vBatesNbrLock 
> +(CHAR(009))+ +
>     (CHAR(013))+ +
>     'Receipts can be entered on only one computer at a 
> time.'+(CHAR(009))+(CHAR +
>     (013)) )
>   PAUSE 2 USING .vMsg +
>    CAPTION 'Receipts' +
>    ICON ATTENTION +
>    OPTION MESSAGE_FONT_SIZE 11 +
>    |BACK_COLOR YELLOW
>   GOTO Done
> ENDIF
>
> --Temp PAUSE for testing
> PAUSE 2 USI 'EDIT USING RcvEdit'
>
> --Unlock Receipt entry so others can enter
> UPDATE Control  +
>   SET BatesNbrLock = 'Unlocked' +
>  WHERE ControlDescr = 'Data'
>
> LABEL Done
>
> CLEAR VAR  +
>  vBatesNbrLock, +
>  vBatesNbr, +
>  vivBatesLock
>
> RETURN
>
>
>
>   

Reply via email to