Parameter order is incorrect when calling Oracle stored procedures

Thread is closed for posting
2 posts, 0 answers
  1. Greg
    Greg avatar
    44 posts
    Member since:
    Jun 2012

    Posted 22 Jun 2012 Link to this post

    When mapping a stored procedure OA reorders the parameters of the procedure and uses this order to configure the store command when executing the procedure. This is a problem with providers that bind parameters by position by default, e.g. Oracle.DataAccess. This is a very dangerous, hard to detect silent bug, I only hit it because OA switched two of my parameters that were of different type (varchar2 and date) thus execution failed with an obscure exception (ORA-01841). If the switched parameters are of the same type then the only symptom is bad data returned from the proc.

    I can think of two possible fixes here (either should fix the problem but I think both should be implemented)

    1. Keep parameters in db order. As requested here:

    2. If I see it correctly OA uses the ODP.NET package provided by Oracle (I'm using Set the OracleCommand.BindByName property to true when setting up the store command to force binding parameters by name.

    This issue is tested with OA version 2012.2.607.1
  2. PetarP
    PetarP avatar
    754 posts

    Posted 26 Jun 2012 Link to this post

    Hello Greg,

     You are correct and this was indeed a bug on our side. As I have written in the other thread the bug is now resolved and the fix will be available with the next service pack.

    Kind regards,
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Back to Top