开发者

Is there a way to pass a custom type from C# to Oracle using System.Data.OracleClient?

开发者 https://www.devze.com 2022-12-31 22:53 出处:网络
I was searching online for a solution to passing a string array to a stored procedure in Oracle. The \"easy\" but messy way was using a comma delimited string.

I was searching online for a solution to passing a string array to a stored procedure in Oracle. The "easy" but messy way was using a comma delimited string.

I had found a sample based on which I created my own type of TABLE of VARCHAR2(200).

I understood that I could use a constructor created "behind-the-scenes" by Oracle to give a list of values that would, in the PL/SQL, be treated as a TABLE I could iterate through.

But when I got to the C# I saw that there is no way for me to create an OracleParameter object that wo开发者_C百科uld allow me to use this implicit constructor.

All the samples I'm finding online for now are dealing with Oracle Data Adapter, none say anything about System.Data.OracleClient.

Is there a way to achieve this?


Every resource I find sends me to ODP, and adds that I shouldn't bother with the Microsoft provider since it's going to be deprecated in .NET 4.

I think I'm giving up on this for now, thanks for the help Alex and Diadistis.

0

精彩评论

暂无评论...
验证码 换一张
取 消