Using a single TADOQuery
i pull records from two different tables using a left outer join:
Select M*, D.* from Courier M Left outer join Courier_VT D on M.Courier_Identifier = D.FK_Courier_Identifier
I use a TDBGrid
to successfully post field updates to my MSSQL DB.
Since there is foreign key reference (FK_Courier_Identifier
with Courier_Identifier
) I get a error when I insert a record,
Cannot Insert the value Null in to column 'FK_Courier_Identifier', table Courier_VT; column does not allow null
but a record is posted in Courier table, i do know that i need to assign the Courier_Identifier
to FK_Courier_Identifier
before posting but don't how and where to do it
How do we Insert \ Delete records in this scenario ? Is it possible to achieve using a single TADOQuery
?