Select FOR UPDATE and $update, is there a problem?
The oldrow is a row variable that represents the row var before the row was updated with new data. It is used by Omnis Studio to search the old record in order to update it with new values – using the complete row vars data as a search data instead of the primary key. If it does not find the record representing the old row in the database then that is an indication that the record already have been updated by another user and can be used to trigger a warning to your user.
In the example that I linked to earlier I use a generic table class for all tables in my systems which is used for all the standard DB operations in each of the data objects in the system. Thus – operations like insert, update, delete are all handled by the generic table class. Searches etc. are mostly done by scripted SQL – both since the SQL (especially for process objects spanning over multiple tables etc.) can be complex but also to allow analysis and optimisation of the SQL code at the server system.
Take care, all the best…
> 1 mars 2018 kl. 22:51 skrev Das Goravani <das@Goravani.com>:
> OK I got it to work by putting the “old row” variable into the parenth. Of the $update statement. It seems to require that you have an “oldrow” in there. Can anyone tell me why that is…why does it need to have the “old row” in there…does it compare?
Kyrkogatan 5A 2 tr
SE-972 32 Luleå
Mobile: +46-70-655 11 72
Hotmail / Messenger: firstname.lastname@example.org
This email and any files transmitted with it are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, please note that any use, distribution, or reproduction of the contents of this email is strictly prohibited and may be unlawful. If you are not the intended recipient, please notify the sender by return email and destroy all copies of the original message including any attachments thereto. Thank you.
Please note that we take reasonable precautions to prevent the transmission of viruses; however, we cannot guarantee that this email or its attachments are free from viruses. We only send and receive emails on the basis that we are not be liable for any loss or damage resulting from the opening of this message and/or attachments.