0

I have one oracle type which is an object

TYPE xyz AS OBJECT(col1 VARCHAR2(10),
                                                  col2           NUMBER,
                                                  col3           VARCHAR2(100));

and one oracle type which is an table

TYPE xyz_table AS TABLE OF xyz

and this type is used as an input parameter in an stored procedure

I want to call this stored procedure from my .net core application and pass multiple values in this parameter.

Any idea how I can achieve this?

Currently I am using following namespaces in my .net core application for oracle:

using Oracle.ManagedDataAccess.Client;

using Oracle.ManagedDataAccess.Types;

I have done this in SQL Server but not able to find any working solution for Oracle and .net core

Christian Shay
  • 2,570
  • 14
  • 24
  • I believe you make a DataTable with columns that match the type xyz, then make rows in the DataTable that match all the instances of xyz, then pass the DataTable as the parameter.. ..but it has been many years.. – Caius Jard Dec 22 '21 at 08:29
  • This is called "table valued parameters". The link I'll post is for SQL Server, but it should work exactly the same (minus the "SQL" vs "Oracle" prefixes for the classes) in Oracle. – nvoigt Dec 22 '21 at 08:30
  • yes, I have used it in SQL Server and it has worked great, but somehow the combination of oracle and .net core is not working out – Ayush Bhargava Dec 22 '21 at 08:31
  • Can you explain "not working out"? What is the error message? what is the *exact problem* you have? – nvoigt Dec 22 '21 at 09:19

0 Answers0