insert with parameter does not work. "Field mus have value" error

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
vadim

insert with parameter does not work. "Field mus have value" error

Post by vadim » Thu 03 Feb 2005 12:22

I have master->detail form to show. I am Using SmartQuery from ODAC 3.90.0.55 for Delphi5. If I create everything with defaults -- it works perfectly.
The problem comes from the fact that I need to show one extra field in DETAIL from MASTER. So instead of default select query I am using this "SELECT T.*,P.ART900,T.RowID FROM BATCHES T, PRODCONFIG P WHERE (T.PRODID = :PRODID AND P.PRODID = :PRODID)
ORDER BY T.BATCHID" (presume that P.ART900 field i need to show in detail table and PRODID is Linked field)

When I start using custom SELECT query, field "DetailFilelds" is not more linked to PRODID (it is empty). It issues an error "ORA-00918: column ambiquously defined" othervice. But still modified SELECT works, and UPDATE with DELETE also work.
One exception ---> INSERT does not work! I spend 2 days fighting with a query "INSERT INTO BATCHES (PRODID, BATCHPRIO, etc.)
VALUES (:PRODID, :BATCHPRIO, etc.)" And always get the same error : "Field PRODID must have value". PRODID value must come from MASTER table. Please help me to define what is the proplem??

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 03 Feb 2005 14:21

Sorry, but we couldn't reproduce the problem. Please send us complete small sample to demonstrate it and include script to create server objects to ODAC support address.

vadim

Post by vadim » Thu 03 Feb 2005 15:05

what address to send?

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 03 Feb 2005 15:25


Post Reply