I've just begun using Oacle w/PB and am trying to get a 'feel' for the differences between PB/Oracle and PB/DB2 (last engagement) and I am having problems with the DECLARE/EXECUTE of Stored Procedures. Any suggestions would be greatly appreciated.
In an User #Event I have the following :
string p_cont_id, p_cd_desc, p_srch_str, p_cms_uid, p_txt_found
//hard-coded values for testing purposes only
p_cd_desc = ''
p_srch_str = 'inspected'
p_cms_uid = 'smith8237'
p_txt_found = 'n'
DECLARE findtext PROCEDURE FOR FIND_RMRKS_TEXT
(P_CONT_ID = :p_cont_id,
P_CD_DESC = :p_cd_desc,
P_SRCH_STR = :p_srch_str,
P_CMS_UID = :p_cms_uid,
P_TXT_FOUND = :p_txt_found) ;
EXECUTE findtext ;
IF SQLCA.SQLCODE<> 0 and SQLCA.SQLDBCODE <> 0 THEN
Messagebox("Error Executing findtext"+String(SQLCA.SQLDBCODE),SQLCA.SqlErrText,Exclamation!)
when running the app I get the following message:
SQLSTATE = S1000
[Oracle][ODBC][Ora]ORA-06550: line 1, column 24:
PLS-00201: identifier 'P_CONT_ID' must be declared
ORA-06550: line 1, column 7:
PL/SQL: staement ignored
Where must it be declared? In oracle? Is this a permissions thing? Should I make it an External Function? If so, how?