editing without rowid

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jdorlon
Posts: 202
Joined: Fri 05 Jan 2007 22:07

editing without rowid

Post by jdorlon » Fri 17 Apr 2009 14:54

Hello,

I have this sql in a TSmartquery connected to a grid.

Code: Select all

select /*+ FULL(Tbl1)  */
       EMPNO, ENAME, JOB, MGR, HIREDATE
       , SAL, COMM, DEPTNO
from   JDORLON.EMP Tbl1
minus
select /*+ FULL(Tbl2)  */
       EMPNO, ENAME, JOB, MGR, HIREDATE
       , SAL, COMM, DEPTNO
from   SCOTT.EMP Tbl2
When I tried to edit the grid, it worked even though I have not selected a ROWID!

This query was used when I changed a value in the EMPNO column:

Code: Select all

UPDATE JDORLON.EMP
SET
  EMPNO = :EMPNO
WHERE
  EMPNO = :Old_EMPNO
How can I disable this behavior in ODAC?

Thanks,

-John

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 21 Apr 2009 07:39

You can only manually check if ROWID field is present in the fields list, and set the ReadOnly property to True, if this field is not present.

Post Reply