Insert Problem for Lookup Title

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
egnew
Posts: 2
Joined: Sat 17 Mar 2007 01:37

Insert Problem for Lookup Title

Post by egnew » Sat 21 Apr 2007 02:07

I have the following SQL:

select emp.deptno,emp.empname,dept.deptname
from emp,dept
where emp.deptno = dept.deptno

When inserting a record onto a form, I want the dept.deptname to display as soon as the user exits the deptno field on the screen.

With some databases this is automatic, with DOA I have to use a query.
How do I do this with ODAC?

Thanks

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

Post by Plash » Mon 23 Apr 2007 07:20

You should set the RefreshOptions of the TOraQuery component to [roAfterInsert, roAfterUpdate]. You should also set the FullRefresh option of the TOraQuery component to True.

Post Reply