Question : ORA-06502 error when calling stored procedure from Visual Basic 6

Hi,

Because of performance issues I am attempting to switch a visual basic 6 application from the Microsoft OleDB for Oracle driver to the Oracle OleDB driver.  I am now getting an Oracle error "ORA-06502: PL/SQL: numeric or value error: character to number conversion error" when calling a number of stored procedures.  These stored procedures of course worked when using the Microsoft for Oracle driver.

On one of the procedures I moved the stored procedure sql into the application an it executed just fine.

Can someone tell me what is going on?

Thanks!

Answer : ORA-06502 error when calling stored procedure from Visual Basic 6

I've looked for 'proof' of why this is happening and the docs seem pretty non-existent.

Some of the data objects do not translate 1-to-1 with Oracle data types....even though they 'should'.

There should also be Oracle OLEDb specific data types that map 1-to-1.  Like: OLEDBType.Decimal

Try the following change and see if it works (maybe also try adDecimal or the OLDDBtype above):
     .ParameterB.Append .CreateParameter("param1", adInteger, adParamInput, , vdblDocNum)
      .ParameterB.Append .CreateParameter("ErrNum", adInteger, adParamOutput, , intErrValue)



Random Solutions  
 
programming4us programming4us