why $update() isn’t working for me ?
Most likely because you haven’t assigned the session object.
iOldRow is only needed if you don’t use primary keys, it uses the old
values to select the record its updating. If you do use primary keys and
tell Omnis to use the primary key it doesn’t use the old row.
I’ve overridden this code to do a comparison between the old row and the
current values to limit the update query to only include columns that
have actually changed and automatically update last modified data.
On 23/1/18 9:39 am, Heir Das Goravani PhDx108 wrote:
> Why am I getting a FALSE on this simple command
> Do iSqlRow.$update(iOldRow) Returns lReturnFlag
> And what does it do to iOldRow, why is that put in there like that?
> I think, am I wrong, that iSqlRow is the row that contains the updated data, and is being written back to the server via $update() I dont see why there needs to be anything in the parenthasis ???
> I understand using iOldRow as a place to hold the data the way it was before data entry, but use of that is risky, but I get you can put back the data the way it was really easily by copying old row to sql row and redraw
> is there a command that needs to be issued before an $update() command in particular, I have first in my save method, nothing before it, the data is changed and ready to be saved, I selected into iSqlrow, should work, but it doesn’t
> I hope my posting of multiple questions doesn’t tick anyone off, sorry if so, I’m sincerely working away here and run into many things at this early stage, and some of you are SO helpful, thank you
> Manage your list subscriptions at lists.omnis-dev.com
Manage your list subscriptions at lists.omnis-dev.com