question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

table value parameters for store procedure

See original GitHub issue

I use c# , .net core and oracle database. I want to pass data value parameter to stored procedure.

 using (var db = new AppDbContext())
 {
       return db.QueryProc<RetType>("pkg_test.sp_test_2",
           new DataParameter() { Name = "ip_obj", DataType = DataType.Structured,  Direction = 
           ParameterDirection.Input, Value = CreateDataTable() }).ToList();
   }

where i use DataTable created by this method:

        private static DataTable CreateDataTable()
        {
            DataTable table = new DataTable();
            table.Columns.Add("num ", typeof(int));
            table.Columns.Add("var ", typeof(string));

            table.Rows.Add(  1, "a" );
            table.Rows.Add( 2, "b" );
            return table;
        } 

I get error: “Value does not fall into expected range”. Does table value parameters supported for Oracle provider?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MaceWinducommented, Jun 12, 2022

@jods4 could you look at it after you are back?

0reactions
MaceWinducommented, Dec 28, 2022

There were no progress made with this feature so I doubt it will work for any direction

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table-Valued Parameters in SQL Server
Table -Valued Parameters aka TVPs are commonly used to pass a table as a parameter into stored procedures or functions. They are helpful...
Read more >
Table-Valued Parameters in SQL Server
Table -Valued Parameters are declared by using User-Defined Table Types, which are tables whose purpose is to be used to store temporary data....
Read more >
Table-Valued Parameters - ADO.NET
Table -valued parameters are based on strongly typed table structures that are defined by using Transact-SQL CREATE TYPE statements. You have to ...
Read more >
Table-Valued Parameters in SQL Server
Table -Valued Parameter allows us to pass multiple columns and rows as input to the stored method. The table values parameters must be...
Read more >
User-Defined Table Type and Table Valued Parameters In ...
Table Valued Parameter allows a table (i.e multiple rows of data) to be passed as a parameter to a stored procedure from T-SQL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found