Pro*C-returning boolean type from stored procedure
Date: 26 Jun 2001 02:36:46 -0700
Message-ID: <b7a7f007.0106260136.1091c038_at_posting.google.com>
I'm following the practice to put common routines like connecting,
disconnecting and dml in functions and put into library. This is good
for debugging and maintenance.
I am writing one c function for each stored procedure(created by
dba) I need to call. For example:
stored procedure:
postMessage (p_SystemNm varchar2, p_MsgTxt varchar2) return boolean;
in pro*c:
void PostMessage(char sSystemNm, char *szMsgTxt){
int tStatus;
EXEC SQL EXECUTE BEGIN :tStatus := postMessage(:sSystemNm, :szMsgTxt); END;
END-EXEC;
}
main() {
: PostMessage('N', "Start running job inserting new customer."); :
}
When I compile, I encountered the following problem:
:tStatus := postMessage(:sSystemNm, :szMsgTxt);
..............1
PLS-S-00382, expression is of wrong type
:tStatus := postMessage(:sSystemNm, :szMsgTxt);
...1
PLS-S-00000, Statement ignored
Is this because integer type of tStatus? What is the corresponding C datatype can I define to match with the boolean type in PLSQL?
Thanks for any reply. Received on Tue Jun 26 2001 - 11:36:46 CEST