none
Parameter discovery problem RRS feed

  • Question

  • Hi 

    I get below problem after migration from Enterprise library 5 to 6 with ODP.NET

    It throws me error as "Parameter discovery is not supported for connections using GenericDatabase. You must specify the parameters explicitly, or configure the connection to use a type deriving from Database that supports parameter discovery."

    My code looks like below

         using (DbCommand command = database.GetStoredProcCommand(query,paramArray))
                {
                    isSuccessful = database.ExecuteNonQuery(command);
                    
                }

    Could you help me with this?

    Monday, June 11, 2018 9:46 AM

Answers

  • Hi All,

    Thank you all. we are able to resolve this issue with parameter discovery. Instead of ODP.net from Oracle, I needed to use odp.net from EntLibContrib from nuget. Hope it might help someone else who would like to pass array of parameters instead of binding each parameter separately which would be cumbersome if we need to call 100s of procedures.



    suryahon

    • Marked as answer by suryahon Tuesday, June 12, 2018 1:29 PM
    Tuesday, June 12, 2018 1:27 PM

All replies

  • This is where you can post about ODP.NET

    https://community.oracle.com/community/database/developer-tools/windows_and_.net/odp.net

    Monday, June 11, 2018 10:23 AM
  • Thank you. I posted it in there. I also leave it in this forum just to see if anyone else in the community could provide some insights.


    suryahon

    Monday, June 11, 2018 11:06 AM
  • Hi suryahon,

    Thanks for posting here.

    Since your component belongs to 3<sup>rd</sup>-party, you should post your question in appropriate forum--ODP.NET|Oracle Community. The Visual C# forum mainly discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools. To effectively manage this forum, it is recommended to post problems inside the above range.

    Thanks for understanding.

    Regards,

    Dolen


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 12, 2018 7:54 AM
  • Hi, Thank you for the suggestion. I already posted in there.

    I researched more to find the problem. It is not the problem with ODP.net. It is actually problem with enterprise library 6 which is actually casting the Database class to GenericDatabase instead of OracleDatabase.

    I would like to know if any workaround for this.



    suryahon

    Tuesday, June 12, 2018 8:19 AM
  • Hi All,

    Thank you all. we are able to resolve this issue with parameter discovery. Instead of ODP.net from Oracle, I needed to use odp.net from EntLibContrib from nuget. Hope it might help someone else who would like to pass array of parameters instead of binding each parameter separately which would be cumbersome if we need to call 100s of procedures.



    suryahon

    • Marked as answer by suryahon Tuesday, June 12, 2018 1:29 PM
    Tuesday, June 12, 2018 1:27 PM