insert with parameter does not work. "Field mus have value" error
Posted: 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??
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??