Recordlocku does not read the record...
Karen Bessel Software Developer Tyler Technologies, Inc. 6500 International Parkway, Suite 2000 Plano, TX 75093 Phone: 972.713.3770 ext:6227 Fax: 972.713.3777 Email: [EMAIL PROTECTED] Web: http://www.tylertech.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brutzman, Bill Sent: Wednesday, May 07, 2008 11:18 AM To: 'u2-users@listserver.u2ug.org' Subject: RE: [U2] Record Locking Problems Do I need a READU if I am already using a RECORDLOCKU command? --Bill -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Wednesday, May 07, 2008 11:34 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Record Locking Problems I feel I am missing something. Why is a READU LOCKED not used? Bruce M Neylon Health Care Management Group "Brutzman, Bill" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 05/07/2008 11:00 AM Please respond to u2-users@listserver.u2ug.org To "'u2-users@listserver.u2ug.org'" <u2-users@listserver.u2ug.org> cc Subject [U2] Record Locking Problems I am trying to make sure that if one Customer.Service rep is updating a Sales Order, then the other Cust.Svc rep is blocked from accessing the same record. The following code will indicates that the record is locked but when the 2nd user goes in (in an independent session), the second user gets in no problem. Since it does not seem to do what I think that it should, [1] I am wondering if I am missing something. [2] I am inclined to create a file to handle this (brute force) with multivalues for user, port, time, date, program, file, record. Comments would be appreciated. --Bill SUBROUTINE SUB.LOCK.SOH.R0 ( Record.ID, Error.Code ) prompt '' open 'SOH' to F.This.File else gosub Error.Opening.File gosub Lock.And.Hold go The.End *----------------------------------------------------------------------- ---- -- *----------------------------------------------------------------------- ---- -- Lock.And.Hold: Lock.Test = recordlocked (F.This.File, Record.ID) crt '**11 Lock.Test ' : Lock.Test : ' [<] ' input Ans begin case case Lock.Test = 0 ; recordlocku F.This.File, Record.ID case 1 ; gosub Error.Record.Locked end case Lock.Test = recordlocked (F.This.File, Record.ID) crt '**12 Lock.Test ' : Lock.Test : ' [<] ' input Ans return *----------------------------------------------------------------------- ---- --- Error.Record.Locked: Lock.Test = recordlocked (F.This.File, Record.ID) crt '**13 Lock.Test ' : Lock.Test : ' [<] ' input Ans Error.Code = 'E' crt @(-1) crt @(-5) crt crt crt crt crt crt crt crt crt crt ' ' : @(-6) crt crt ' ___________________________ ' crt ' \ \ ' crt ' \ Error, Record Locked \ ' crt ' \__________________________\ Try Later ' crt ' ' crt ' ' crt ' [X] ' crt ' ' : input Ans, 1 Ans = upcase(Ans) begin case case Ans = 'X' ; null case 1 ; go Error.Record.Locked end case return *----------------------------------------------------------------------- ---- --- Error.Opening.File: crt @(-1) crt @(-5) crt crt crt crt crt crt crt crt crt crt crt crt ' Big Problem... ' : @(-6) crt crt ' _________________________ ' crt ' \ \ SOH ' crt ' \ Error Opening File \ ' crt ' \________________________\ Contact HK.IT ' crt ' [X] ' crt ' ' : input Ans, 1 Ans = upcase(Ans) begin case case Ans = 'X' ; null case 1 ; go Error.Opening.File end case return to The.End *----------------------------------------------------------------------- ---- --- The.End: RETURN END ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/