How to avoid ORA-29470 when bindin variables to a Cursor on Oracle 11g
I have an Old VB6 Applications that uses Cursors in a process without problem on versions below to 11g on Oracle.
the thing is that the new security features for cursors added on Oracle 11 R1 is affecting me. My application only creates a cursor from VB that only update a table and is done using a PLSQL builder, using the same cursor Once it is created we start to bind the info on that cursor...
package_sql is an Oracle package that only do this: dbms_sql.bind_array(hCursor, sName, aValues);
Here is a code Example of my application:
m_AddOraParam "SQL", ORATYPE_VARCHAR2, "update TABLE set " & sSetFields & " where ID = :ID and " & sFilter
Set p = m_AddOraParam("hc", ORATYPE_SINT, 0, ORAPARM_OUTPUT)
m_AddOraParam "hc", ORATYPE_SINT, m_hcPRDUpdate, ORAPARM_INPUT
Set p = m_AddOraParam("RecCount", ORATYPE_SINT, 0, ORAPARM_OUTPUT)
If m_cmdPRDUpdate Is Nothing Then
Set PLSQL = New PLSQLBuilder
PLSQL.AddLine " package_sql.BindNumberArray(:hc, ':ID', :ID);"
PLSQL.AddLine " package_sql.BindDateArray(:hc, ':Period', :Period);"
PLSQL.AddLine " package_sql.BindNumberArray(:hc, ':Hours', :Hours);"
PLSQL.AddLine " :RecCount := dbms_sql.execute(:hc);"
Set m_cmdPRDUpdate = m_CreateOraCmd(PLSQL.Text)'->> ERROR ORA-29470
What I'm trying to find out is if someone else know how to relax those security things, or how to workaround it... change the way how my application work imply a lot of things.. that's why I'm looking for another exit the solution
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.