table value parameters for store procedure
See original GitHub issueI 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:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jods4 could you look at it after you are back?
There were no progress made with this feature so I doubt it will work for any direction