Dapper OracleDynamicParameters, multipleQquery and clause 'in'
See original GitHub issueHi, I am struggling with something not sure why not able to execute.
I have a clause in that I would like to execute in a second query… for simplicity let’s say something like :
`
begin
open :c_query1 for
select * from T1;
open :c_query2 for
select * from T2 t_t2 where t_t2.name in :pNames;
end;
`
where I would have my parameters as `
var dynParams = new OracleDynamicParameters();
dynParams.Add(":c_query1", direction: ParameterDirection.Output, dbType: OracleMappingType.RefCursor);
dynParams.Add(":c_query2", direction: ParameterDirection.Output, dbType: OracleMappingType.RefCursor);
dynParams.Add(":pNames", new[] {"AA", "BB"});
`
when I execute this my “in clause” comes empty… any idea? thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Using Dapper QueryMultiple in Oracle
Dapper seems to just pass the SQL command straight along to ADO.NET and whatever db provider is executing the command. In the syntax...
Read more >Issues · DIPSAS/Dapper.Oracle
Contribute to DIPSAS/Dapper.Oracle development by creating an account on GitHub. ... Dapper OracleDynamicParameters, multipleQquery and clause 'in'.
Read more >Dapper QueryMultiple, QueryMultipleAsync
The Dapper QueryMultiple method allows you to select multiple results from a database in a single query and then, after reading those results...
Read more >Multiple Executions. A nice feature that is NOT as cool as…
In Dapper .NET, Multiple execution is a convenient (or maybe not? make sure you read the article until the end!) way to execute...
Read more >Dapper Avoid parentheses in SQL statement when using ...
Approach 1 - Dynamic query construction using string manipulation classes. Weird. You don't need to do this. Dapper helps you to convert a ......
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 FreeTop 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
Top GitHub Comments
Hi @ut786 , that is what I already doing (string concatenation) and was trying to avoid… as for that is always risk of sql injection, I would say… and actually using “Aggregate” - cleaner…
Try to use DataTable in instead of string array.