Omnis 4 to 10 difference
Mike Matthews - Omnis
omnis at lineal.co.uk
Sat Sep 24 07:46:19 UTC 2022
Hello Doug / Andrew,
My money is on #MU only, regardless of serial number. The serial number only allows more than 1 connection to the same DF1 with the same serial number.
And I like the reference to Apple II floppy drive read :)
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co/>
On 23 Sep 2022, at 18:09, Doug Easterbrook <doug at artsman.com<mailto:doug at artsman.com>> wrote:
good morning
it has been ages since I used prepare for edit. I always assumed it re-read the CRB from disk. …. so I wanted to see what the current omnis documentation said. I’ve included the link and the top few lines near the end of the email
there is a key comment ‘Rereads the current record WHEN in multi-user mode in case another user changed the data’ and goes on to say how it locks things.
https://www.omnis.net/developers/resources/onlinedocs/CommandRef/Commands_A-Z/prepare_for_edit.html#prepare-for-edit
(side note: the difference in how a command works based on #MU may be a performance thing from days of yore on apple II and avoiding a floppy read)
so that leads to the thought
1) if you use a multi-user licence number, does it start to work the same?
2) or, as Mike asks, do you need to have two people in the file to make it behave like it used to in Studio 4??
What does the #MU flag say. is it 0? (meaning in single user mode) — which might give you the answer in testing if prepare for edit is broken, or is it just adhering to the definition of how it works.
i.e. if you see #MU=0 in studio 4 and it rereads the record — then its is acting contrary to what the current documentation is suggesting and what the studio 4 documentation is saying as well)
I’ve included the comment from studio 5 documentation that says it will re-read records in multi user mode. It appears the command has not supposed to have changed its behaviour.
bottom line:
1) display #MU to see what it says. 0 means do not re-read the record, according to the documentation.
2) the trick will then be to use a multi user serial number to see if you can flip #MU to non zero and ge the behaviour you want.
or
3) work with the way the command is designed and do a single file find before you use ‘prepare for edit’ to ensure it is read if #MU is 0
I’m hoping that a multi user licence number is all you need to make it work right (or compatibly)
Studio 10 comments on prepare for edit
Description
This command prepares Omnis for editing data. It brings records into memory ready for updating and rereads the current records when in multi-user mode in case another user has made a change to a record since it was read in. Your method can then alter the values of the records. The contents of the current record buffer are not written back to disk until Update files<https://www.omnis.net/developers/resources/onlinedocs/CommandRef/Commands_A-Z/update_files.html> is encountered.
If there is a window open and you require data to be entered via that window, Enter data<https://www.omnis.net/developers/resources/onlinedocs/CommandRef/Commands_A-Z/enter_data.html> is required after the Prepare for edit.
Prepare for edit/insert mode is cleared only by a Cancel prepare for update<https://www.omnis.net/developers/resources/onlinedocs/CommandRef/Commands_A-Z/cancel_prepare_for_update.html>, Update files or Quit all methods<https://www.omnis.net/developers/resources/onlinedocs/CommandRef/Commands_A-Z/quit_all_methods.html> command. You can build lists, print reports and change the main file in the middle of an update without cancelling the Prepare for... mode.
Multi-user considerations
Records in the current record buffer from Read/write files will be locked when Prepare for edit is executed, so as to prevent simultaneous editing of a record. The lock is removed by Update files<https://www.omnis.net/developers/resources/onlinedocs/CommandRef/Commands_A-Z/update_files.html> or any command which cancels the Prepare for mode.
studio 5 comments on prepare for edit
Description
This command prepares Omnis for editing data. It brings records into memory ready for updating and rereads the current records when in multi-user mode in case another user has made a change to a record since it was read in. Your method can then alter the values of the records. The contents of the current record buffer are not written back to disk until Update files is encountered.
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com<http://www.artsman.com/>
Phone (403) 650-1978
On Sep 23, 2022, at 1:19 AM, Mike Matthews - Omnis via omnisdev-en <omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>> wrote:
Hello Andrew,
If you have another copy of Omnis connect to the DF1, does Studio then reload the CRB?
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:omnis at lineal.co.uk><mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk/><http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co.uk/><http://www.sqlworks.co/>
On 23 Sep 2022, at 07:49, Andrew McVeigh <surfway at bigpond.com<mailto:surfway at bigpond.com><mailto:surfway at bigpond.com>> wrote:
I am the only user in this case, on both OS4 and OS10, OS4 reloads the record and clears the calculated value while OS10 does not, using 10.2 31315
I’ll create a test library to see what I can find
Andrew McVeigh
Surfway Real Solutions
Phone 02 44412679 Mobile 0418428016
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.surfway.com.au&c=E,1,AEn-0pYfEBhKGGQYhrKL244wZ4Dj0ItxFwUhDhqkuDXESGg6zJsxNM1TndzhxPaDcNpIFAZxSlw90mwpL5GtPzJvyGHdhyLyMpLlNK_IVmA,&typo=1
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.berrarabeach.com.au&c=E,1,jrupBtrynorLbm-mQfe91Aadv-dk0Ykcukhe6aqHAeVg1NmEpWehFG4TdjiLQiwvuD2H5l7t83UxR2gBBQfG2DlpwDXuLxLFLN3Vnx-eaIogVNOm&typo=1
<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.surfway.com.au%2f&c=E,1,WSW7Z-U6LA0wAgjphpnlpry_h69BVz6kijsYVlUT8o4-0_QFASfFtL4jX5HgH8Hxvl_VxqmbKiSRSDJujwViR1Y9ztimE8ATwSH8bgaS6rPKcdzyJYRPUUyflE8,&typo=1>
<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.surfway.com.au%2f&c=E,1,K9TdUWcIyvGihNwup74kjLPrv61eoTU7zl1rfqvQNZ7PKi9J5KgIVEpwiVt47QGM8vElFoC6jOkCK3i1gwvf_m1rjlsDGVfCFsUwC7WqEAw,&typo=1>
On 23 Sep 2022, at 1:23 am, Mike Matthews - Omnis via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
Hello Andrew,
Hmm, if the system detects you are the only user connected, does the CRB get reloaded with the Prepare for edit command? In a multi user scene, it must be. Must it?
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.lineal.co.uk&c=E,1,rinMdPbawdlzb3RNqIQjJTBf4F4vCx3fPBBWQR7qiw3idYEt6_y7oAvjGELT68mI0-2hT3bpaRBDRa0YugrVJiF3CD1MaA0IYQqlD77A8AhwWO3vFt0,&typo=1<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk%2f&c=E,1,zNpjh9AOBK2FH3Lu-895_7B5WNXVPXPX0P0zcz_pLcbf8NLpOA-amh6vtvqPws81wTqAEXRElV3griLJ4g3Az79RTtye4FUtBZAQv8Jl&typo=1>
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.sqlworks.co.uk&c=E,1,P5kRACkrwaBQWEpujg_0Vye-Ex7ih_3SozO7EiCCHN77T9NExT8-MkQfhfi4QER3jA57dZ-f3RlkygeeD8BAbuqZzFt9NiOULyngLUnHDYUINA,,&typo=1<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co%2f&c=E,1,DKQGhfGrWtrWZweyvMsr735PO-jEI4FggZV_ffWJVaJt5tcuSWEiwHTGOuEOUCXq-oZOrK8GrDyTG3RMhYVTJe0dF66FPKJOWyjjXd0LXY7GLSZdwJ0IwziP6w,,&typo=1>
On 21 Sep 2022, at 05:31, Paul Mulroney via omnisdev-en <omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>> wrote:
Hi Andrew
That doesn't sound quite right.
The fields in the main file will be loaded from disk at the Prepare for Edit stage, assuming that it was successful in getting a lock. Does your code look something like this:
Set main file {myFile}
Set read/write files {myFile}
Prepare for Edit
If flag true
# make changes here
update files
else
# record locked by someone else?
end if
Regards,
Paul.
On 21 Sep 2022, at 10:07 am, Andrew McVeigh <surfway at bigpond.com<mailto:surfway at bigpond.com>> wrote:
Just found a weird difference in execution of the same code in Omnis 4 and Omnis 10 (not using SQL)
The coding is probably not the best but anyway
Calculate DTPAID as 10 ##DTPAID is a field in the Main Data File
Prepare for Edit ##This rereads the CRB and DTPAID becomes zero
This is what happens in Omnis 4
In Omnis 10 the DTPAID field maintains it’s value of 10 when you do the Prepare for Edit
Is this meant to happen?
Andrew McVeigh
Surfway Real Solutions
Phone 02 44412679 Mobile 0418428016
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.surfway.com.au&c=E,1,KwwNjcD0pPpZKjXDrouIoaIaOJINKQ_rqi6uIEUc9Iax2G_ggfhahbDmRuWpZu4mlEQgYnrvwvLSGLFO0_cWLatsTmONMK9jitSx8ypycQ,,&typo=1<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.surfway.com.au&c=E,1,PVLcYcxDqZOpqWb0BlianriLlF9hxzysq8dsL8farY8WcCMpSGYeQPFwNZqzjsqXWl2094h-7UDlqfq64Y14kyws11udbcdTaQ69_Z5Moyy0w0VRlRtFaDPcLAE,&typo=1>
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.berrarabeach.com.au&c=E,1,wQTg4q2xPEcqmxncOih5YG1I2RoQNoKETcjqqm1EwUdHU4C1gEJjMmRkJc_AxjHbHpuJG1jsYyZcWIE9BTPrFQU2Ar2OMHnKbQUf9Ji-a2JxWYHp_Ox3m9tT&typo=1
_____________________________________________________________
Manage your list subscriptions at https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,gVBBMeNiwnRdD9BWBrqCmukFG2B1Zi9TrCRtN9whKz_Ai1X0KVcer67PeUXSetfcfIaeoASH3EUxN0icziOzVYitfM6LhinXdGDcj7RpmqeGK9JcjNMOWjntT98,&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
No matter how much you push the envelope, it'll still be stationery.
--
Paul W. Mulroney We Don't Do Simple Pty Ltd
pmulroney at logicaldevelopments.com.au<mailto:pmulroney at logicaldevelopments.com.au> Trading as Logical Developments
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.logicaldevelopments.com.au&c=E,1,ZlDAq0uJPQbO6dU3Tml9ex-HNemBEvnQ5cVCx1S2t3Kng4qHo1vSUQpd7WVq1xHS8EWq2w54GorUolSWgJeNqZndttkvx4FzmmjTfku6J2GEMJfunwN6&typo=1<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.logicaldevelopments.com.au&c=E,1,pnL_WKf-a-pc1NIqdjq3G-FNeU0unjeItBuN6dDFF3bZVPBENGB2b1yxIzOhJkpGshru4CO5c3y7jyNHg54KvSfxQFRQR3MtQoNRtE8zhiQisupl6B4-EeJAfITv&typo=1> ACN 161 009 374
Ph: +61 8 9458 3889 86 Coolgardie Street
BENTLEY WA 6102
_____________________________________________________________
Manage your list subscriptions at https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,uGlmQeHXkLGsMJV16_k96VJvFaM2fiHQNihBqx_GrwtQ3Vwm8zghY5HUJ3csFFkBVMYYcNXWXA_b8YSMJHAE_k-H0H5d5BEgIR7XJy0YUm2uZX-cvNJQGVoL&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,nNJBFQhStOVSitFkxX3CuI6jVQJtzAR-tEJeYgUexaYA5B4dyWTusVDo4lYKAa4yUsT1jQLSO0lG3VupRIMG7Cab3xwUc9cLMfX-kxNPPS0lD7ydTeQHyck,&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.omnis-dev.com&c=E,1,WG3c8Q8tRCtgygqim0GNcFqTt4l9bDidg1f1FuegjB2E3PQ0jeAcwN08MisQ1TGTVM5TbM7m0ozDuXsSR3JxDlFSU8RBBK-gq9HF98f4&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list