ace333 Posted October 11, 2005 Posted October 11, 2005 CREATE OR REPLACE PROCEDURE WES_UAT.P_INS_EMAIL ( param_sendTo IN EMAIL.SENDTO%TYPE, param_sendFrom IN EMAIL.SENDFROM%TYPE, param_subject IN EMAIL.SUBJECT%TYPE, param_format IN EMAIL.BODYFORMAT%TYPE, param_priority IN EMAIL.PRIORITY%TYPE, param_body IN EMAIL.EMAILBODY%TYPE, param_errorEmailAddress IN EMAIL.ERROREMAILADDRESS%TYPE, param_ccEmailAddress IN EMAIL.CCEMAILADDRESS%TYPE, param_systemName IN EMAIL.SYSTEMNAME%TYPE ) IS BEGIN INSERT INTO EMAIL( ID, SENDTO, SENDFROM, SUBJECT, EMAILBODY, BODYFORMAT, PRIORITY, LASTUPDATED, PROCESSEDFLAG, ERROREMAILADDRESS, CCEMAILADDRESS, SYSTEMNAME, INPUTDATE ) VALUES( SEQ_EMAIL_ID .NEXTVAL, param_sendTo, param_sendFrom, param_subject, param_body, param_format, param_priority, SYSDATE, 'N', param_errorEmailAddress, param_ccEmailAddress, param_systemName, SYSDATE ) returning id into GLOBALS.i ; END; This is an oracle stored proc How do I read the value i from the stored proc from c#, when i do the insert i want to be able to get the id associated with that insert Quote
hrabia Posted October 18, 2005 Posted October 18, 2005 Declare one more stored procedure parameter as an out parameter for example: param_ID OUT NUMBER and then... RETURNING ID INTO param_ID; ...and then you can read param_ID value in your c# function. Quote A man and a dog have an average of three legs. Beaware of Statistics.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.