Subject | Re: [IBO] TIBOQuery Invalid custom DML column referenced |
---|---|
Author | Ronan van Riet |
Post date | 2004-01-24T11:48:56Z |
>Best you show the ddl for the insert procedure...Hello Helen,
>
>Helen
>If WWWCON_ID is generated, then use GeneratorLinks for it and don't assignMy GeneratorLinks property looks like
>it yourself. OTOH, if your SP is actually setting it then it should not be
>an input param of the exec SP.
E.PROJECT.ROW_ID=GEN_E_PROJECT_ROW_ID
Here is the DDL for my insert, followed by the DDL for the select - in case
it is useful.
CREATE PROCEDURE SP_INSERT_PROJECT(
WWWCON_ID INTEGER,
WWWDESC_TEXT VARCHAR(255))
RETURNS (
O_ROW_ID INTEGER)
AS
DECLARE VARIABLE ID INTEGER;
BEGIN
id = GEN_ID(GEN_E_PROJECT_ROW_ID, 1);
INSERT INTO E_PROJECT (ROW_ID, DESC_TEXT)
VALUES (:id, :wwwCON_ID, :wwwDESC_TEXT);
O_ROW_ID = id;
END
CREATE PROCEDURE SP_GET_MY_PROJECTS(
WWWCON_ID INTEGER)
RETURNS (
O_ROW_ID INTEGER,
O_CREATED DATE,
O_CREATED_BY VARCHAR(50),
O_LAST_UPD DATE,
O_LAST_UPD_BY VARCHAR(50),
O_PROJECTTYPE VARCHAR(30),
O_DESC_TEXT VARCHAR(10),
O_STAGE INTEGER,
O_CALCDATE INTEGER)
AS
begin
FOR
SELECT prj.ROW_ID,
prj.created, creator.fst_name || ' ' || creator.last_name,
prj.last_upd, updator.fst_name || ' ' || updator.last_name,
prj.projecttype, prj.desc_text, prj.stage, prj.calcdate
FROM E_PROJECT prj,
E_CONTACT creator,
E_CONTACT updator
WHERE prj.created_by = creator.row_id
AND prj.last_upd_by = updator.row_id
AND prj.cst_con_id = :wwwCON_ID
AND prj.Active_ = 'Y'
ORDER BY prj.last_upd desc
into :o_ROW_ID, :o_created, :o_created_by, :o_last_upd, :o_Last_Upd_by,
:o_projecttype, :o_desc_text, :o_stage, :o_Calcdate
DO BEGIN
SUSPEND;
END
end
Thanks for your help,
Ronan van Riet
_________________________________________________________________
Hotmail en Messenger on the move
http://www.msn.nl/communicatie/smsdiensten/hotmailsmsv2/