RE: -1 undefined database event
Kirk, This seems like it may be the cause! I’ll check this out!! THANKS!!! David Ringsmuth From: Kirk Brooks via 4D_Tech Sent: Wednesday, April 24, 2019 4:38 PM To: 4D iNug Technical Cc: Kirk Brooks Subject: Re: -1 undefined database event David, On Wed, Apr 24, 2019 at 2:23 PM David Ringsmuth via 4D_Tech < 4d_tech@lists.4d.com> wrote: > The message says the record is locked, but 4D’s Locked($pTable->) returns > false, and so does 4D’s Read only state($pTable->). > > Under what circumstances would this happen? > If you are using 4D server this can happen when the record has been loaded/modified on the server. Triggers run on the server. This is one way you get this sort of situation. The other, which has bitten me before, is when an EXECUTE ON SERVER method has loaded, but not unloaded, a record. -- Kirk Brooks San Francisco, CA === What can be said, can be said clearly, and what you can’t say, you should shut up about *Wittgenstein and the Computer * ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
RE: -1 undefined database event
Chip, The data file is in use by 20+ people who are updating it. It can’t be in read-only. The system automatically runs a full validate data file every night, and also verifies every index value is correct. I don’t think the record is damaged, but I had not thought of that! Thanks! David Ringsmuth From: Chip Scheide Sent: Wednesday, April 24, 2019 4:32 PM To: 4D iNug Technical Cc: David Ringsmuth Subject: Re: -1 undefined database event immediate thoughts: - the data file it self is read only. -- due to file access permissions (from the OS) -- the data file is open by another copy of the structure -- the record (or more) are damaged in some manner (run MSC) Chip On Wed, 24 Apr 2019 16:23:09 -0500, David Ringsmuth via 4D_Tech wrote: > The message says the record is locked, but 4Dʼs Locked($pTable->) > returns false, and so does 4Dʼs Read only state($pTable->). > > Under what circumstances would this happen? > > Undefined Database Event.[-1] in the method 'Save_Record', on line 50. > Method: Save_Record > Line: 50 > 1066: dbmg: Record is locked in table Student of database CMv10 > 1046: dbmg: Cannot save record 132171 in table Student of database CMv10 > > If (Not(Locked($pTable->)) & Not(Read only state($pTable->))) > If (ModifiedRecord ($pTable;1+2;->$tModified)) > Error:=0 > C_TEXT($WindowTitle_t) > SAVE RECORD($pTable->) // this is line # 50 > End if > else > ... > end if > > David Ringsmuth > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** --- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: -1 undefined database event
David, On Wed, Apr 24, 2019 at 2:23 PM David Ringsmuth via 4D_Tech < 4d_tech@lists.4d.com> wrote: > The message says the record is locked, but 4D’s Locked($pTable->) returns > false, and so does 4D’s Read only state($pTable->). > > Under what circumstances would this happen? > If you are using 4D server this can happen when the record has been loaded/modified on the server. Triggers run on the server. This is one way you get this sort of situation. The other, which has bitten me before, is when an EXECUTE ON SERVER method has loaded, but not unloaded, a record. -- Kirk Brooks San Francisco, CA === What can be said, can be said clearly, and what you can’t say, you should shut up about *Wittgenstein and the Computer * ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: -1 undefined database event
immediate thoughts: - the data file it self is read only. -- due to file access permissions (from the OS) -- the data file is open by another copy of the structure -- the record (or more) are damaged in some manner (run MSC) Chip On Wed, 24 Apr 2019 16:23:09 -0500, David Ringsmuth via 4D_Tech wrote: > The message says the record is locked, but 4D’s Locked($pTable->) > returns false, and so does 4D’s Read only state($pTable->). > > Under what circumstances would this happen? > > Undefined Database Event.[-1] in the method 'Save_Record', on line 50. > Method: Save_Record > Line: 50 > 1066: dbmg: Record is locked in table Student of database CMv10 > 1046: dbmg: Cannot save record 132171 in table Student of database CMv10 > > If (Not(Locked($pTable->)) & Not(Read only state($pTable->))) > If (ModifiedRecord ($pTable;1+2;->$tModified)) > Error:=0 > C_TEXT($WindowTitle_t) > SAVE RECORD($pTable->) // this is line # 50 > End if > else > ... > end if > > David Ringsmuth > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** --- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **