Pregunta

Let's say i have 1 query, 1 main table and 2 left joins. Query looks like (for example)

SELECT "E.name", 
       D."title" 
  FROM "Employees" AS E 
       LEFT JOIN "Department" AS D 
            ON E."depid" = D."id_dep" 

So now i want to change the information directly in the DBGrid. I put dataset into Edit mode, but as a result i can only edit columns which refers to Employees table, and not Department.

I know, that this method is not very correct, it would be easier and more correct to use UPDATE request, but this is a requirment of the customer. Thank you for reply

¿Fue útil?

Solución

Instead of one query you should use two datasets with Master-Detail Relationship to work on each dataset (Create, Read, Update, Delete).

The documentation will guide you on how to Creating Master-Detail Relationships

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top