Hi I'm fairly new ocilib and having a couple of issues with binding in a stored proc, hopefully should be simple and you can help
I am able to call the stored proc successfully if I hard code the parameters, they are all in bound:
Statement st(m_Connection);
oSql = "BEGIN NETWORK.WP_SITE_ID_RESERVATION.ADDBULK('WP16_12_2_4', 2, 'JG026');END; ";
st.Prepare(oSql);
the issue is if I try to bind the number '2' this fails to reach the stored proc. The stored proc gets a value of '0'. The parameter in the stored proc is number.
If I use the below
Statement st(m_Connection);
oSql = "Begin NETWORK.WP_SITE_ID_RESERVATION.ADDBULK (:p01,:p02,:p03); End;";
st.Prepare(oSql);
int num = 2l;
st.Bind(":p02", num , BindInfo::In);
The stored proc gets a value of 0
the string binds works fine
Hopefully there is something simple I am missing, hope you can help.
Cheers
John
Anonymous
View and moderate all "support-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Support Requests"
All good, I worked it out, I was binding it in another function but hadn't referenced the original variable