Reputation: 113
I'm using TMyQuery component (from MyDAC suite) with the this sentence:
SELECT id, name, salary, ‘n’ as modified FROM employees
If I change the fields SALARY and MODIFIED I would receive the error “Unknown column MODIFIED in field list”
OK. One solution would be the use of SQLUpdate property, specifying the sentence for update:
UPDATE employees SET name = x, salary = y WHERE id = z
But… this implies that the field NAME would be updated even if the only field really changed is SALARY. And this could lead to problem. Imagine that, at the same time, ComputerA changes the field NAME and ComputerB changes the field SALARY. The data from the last computer to apply would prevail.
Could anyone please help me?
Upvotes: 1
Views: 91