Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Human Capital Management (HCM)
Human Resource Management (HRMS)
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Nov 7, 2012 5:07 AM by
OTL call for oracle function
Nov 6, 2012 5:21 AM
I created a Oracle function like get_employee_id() which will return the employee id if the name and department exists.
If not exists it will insert the record and return the emp_id.
if name and department exists id will be returned
else record will be inserted and emp id will be returned.
emp_id is a sequence which will be triggered to auto increment.
Not getting a correct way to access get_employee_id() from OTL interface.
I am trying like
query << "BEGIN :3<int> := get_employee_id(:1<char>,:2<char>); END;" ;
otl_stream oos(1, query.str().c_str(), db());
oos << emp_name ;
oos << emp_dept ;
oos >> emp_id ;
if(!oos) break ;
Please let me know what is the correct way of accessing this.Thanks for the help in advance.
Edited by: jagdish1206 on Nov 6, 2012 3:21 AM
This content has been marked as final.
Show 1 reply
Re: OTL call for oracle function
Nov 7, 2012 5:07 AM
in response to
Sorry. I posted this in wrong Forum.
Posted in "C++ Call Interface (OCCI) : forum".