Editable TOracleDataset becomes read-only in master-detail mode

Hi,

I have a simple query, written below, that is read-write. But when I set it as the detail of a master-detail relationship, it becomes read-only. The master query is read-write and has a master key. The detail query has a master key and a FK constraint with the master table. The queries:

Master:
SELECT
AC.ID,AC.IDCurso,AC.DataInicio,AC.DataTermino,AC.DataInicioReal,AC.DataTerminoReal,AC.SeqTurma,AC.Vagas,AC.IDLocal,AC.RowID,C.Nome as NOMECURSO
FROM
EscolaAgendaCursos AC, EscolaCursos C
WHERE
C.ID = AC.IDCURSO

The detail query
select
EscolaDiarioAulas.*,EscolaDiarioAulas.RowID
from
EscolaDiarioAulas
where
IDCursoAgendado=:ID

PS: The master query is the master of another query, too. But with that one, there is no problem. The joined field NOMECURSO is ReadOnly and fkInternalCalc, as the help suggests.

Just to be clear: the first query is writable, and the second is writable ONLY IF there is no master-detail relationship. A master query must have only ONE detail query?
 
If one ore more detail records exist, the master fields of the master dataset (typically the primary key columns) will become read-only to prevent cascading updates.

Other fields can still be updated though.

------------------
Marco Kalter
Allround Automations
 
Back
Top