Write value on subselect SQL query column in dbgrid

118 Views Asked by At

I need a join table from table 1 and table 2 and be able to apply updates on it so here's my SQL:

select 
    table1.ackode, tabble1.ket,
    table1.debet, table1.kredit, 
    (select table2.ket from table2  
     where table2.kode = table1.ackode 
       and table2.ptlokasi = table1.ptlokasi) as x 
from table1;

This resulted in a dbgrid like this :

enter image description here

now, whenever I click on ackode column, it'll open another form which I can select data from it. I wanted ACKODE and X column changed according to data values I've selected in that new form. However, it raised error as X column cannot be written. is there any idea how to make it possible? I've set the X column's readonly property to false, however no such luck. Thanks.

0

There are 0 best solutions below