Giter Club home page Giter Club logo

Comments (6)

epaulsen avatar epaulsen commented on August 15, 2024

I'm not at work right now, currently on vacation, so no access to Oracle environment to test this.
It should just work the same way it would using a OracleCommand.ExecuteReader.

What data type is Var1 ? It should be something that implements IEnumerable<string>
e.g

string[] Var1 = new {"foo","bar" }

from dapper.oracle.

wast avatar wast commented on August 15, 2024

Var1 is typeof List<string> and then I do ToArray() as you can see in the 1st post.

from dapper.oracle.

epaulsen avatar epaulsen commented on August 15, 2024

Then I have no idea at the moment, sorry.
My best suggestion is to attempt to do the query using a normal OracleCommand.
Dapper and Dapper.Oracle uses that under the hood. If you can make it work using OracleCommand, it should be possible using Dapper.Oracle.

from dapper.oracle.

wast avatar wast commented on August 15, 2024

Do you have any example with OracleCommand ?

from dapper.oracle.

epaulsen avatar epaulsen commented on August 15, 2024

Sorry. Try and see if stackoverflow.com can help you.

from dapper.oracle.

aditya119 avatar aditya119 commented on August 15, 2024

I'm late but maybe this will help someone.
To call a procedure with array as input parameter, this is what worked for me:

string[] valueArray = value.ToArray(); // value is IEnumerable<string>
Parameters.Add("pi_param", valueArray, dbType: OracleMappingType.Varchar2, direction: ParameterDirection.Input, collectionType: OracleMappingCollectionType.PLSQLAssociativeArray);

It works when SysRefcursor is added as out parameter, just do this:
Parameters.Add("po_cursor", dbType: OracleMappingType.RefCursor, direction: ParameterDirection.Output);

Using ArrayBindCount as mentioned in documentation gave an error PLS-00306: wrong number or types of arguments in call to procedure
Not sure, but maybe that works when there is only a single parameter?

from dapper.oracle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.