Select FOR UPDATE and $update, is there a problem?
Here is my 2 cents worth, I use the text generator to do some times to generate a query, here is an example.
Begin text block
Text: WHERE dv_stat = ‘C’ AND dv_dt_mod >= ‘[pStartDt]’ AND dv_dt_mod <= '[pFinDt]' End text block Get text block LvSQLSearch Do LvObject.$PGQueryRecords('FEquipManager',LvSQLSearch,'dv_sq',0,'tEquipManager',nam(dv_sq),'qEquipManager') Returns LvMainLst ;; (pFileName,pWhere,pOrderByColumn,pMaxRecords,pTableClassName,pPrimaryKeyName,pQueryClass) Sometimes this quicker for me to use this method and get the job done and move on, instead getting syntax errors. Just another method, to get the same thing done. Chris Hughes -----Original Message----- From: omnisdev-en [mailto:email@example.com] On Behalf Of Das Goravani Sent: Friday, 2 March 2018 7:51 AM To: OmnisDev List - English Subject: Re: Select FOR UPDATE and $update, is there a problem? 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? > On Mar 1, 2018, at 1:29 PM, Das Goravani <das@Goravani.com> wrote:
> Is there a problem with using a $update to update a record that was
> SELECTED …. FOR UPDATE
> Do you have to do the update manually? Because it won’t work…the $update gives flag false and does not update the customer record. This is a straight forward thing..I’m updating the balance owed, this is a simple select fetch change a value and update scenario.
> Do iCustRow.$select(con(‘WHERE cust_id=’,iCustRow.cust_id,’ FOR
> UPDATE’)) Returns #F
> Do iCustRow.$update() Returns #S1
> Manage your list subscriptions at lists.omnis-dev.com Start a
> new message -> mailto:firstname.lastname@example.org