i'm attempting call oracle sproc via oracle.dataaccess.client. actual exec call produces error:
item has been added. key in dictionary: 'oracle.dataaccess, version=4.121.1.0, culture=neutral, publickeytoken=89b483f429c47342' key being added: 'oracle.dataaccess, version=4.121.1.0, culture=neutral, publickeytoken=89b483f429c47342' stack trace:
at system.collections.hashtable.insert(object key, object nvalue, boolean add) i'm @ loss start diagnosing problem; there's no hash table in code, , stack trace doesn't tell me in framework or library code problem occurring. googling has produced nothing seems relevant. can query data fine, , can ran sproc succesfully. can run sproc directly in sql developer without problem, using same creds , arguments.
i had been getting similar error message referring general utility library, not used. removing reference left me above oracle.dataaccess error.
here's code; casual testing, lack of error handling.
var conn = new oracleconnection("<conn string>"); conn.open(); var cmd = new oraclecommand("myschema.mysproc", conn); cmd.commandtype = commandtype.storedprocedure; var param = new oracleparameter("id", oracledbtype.decimal, parameterdirection.input); param.value = 1234; cmd.parameters.add(param); // several more in params; there no name collisions param = new oracleparameter("numupdatesmade", oracledbtype.decimal, parameterdirection.output); cmd.parameters.add(param); param = new oracleparameter("typelist", oracledbtype.array, parameterdirection.input); param.udttypename = "myschema.simplevarraycustomtype"; param.value = new [] { "a", "b" }; cmd.parameters.add(param); cmd.executenonquery(); // error thrown here console.out.writeline(cmd.parameters["numupdatesmade"]); i've not used oracle custom types before, , other sproc i've tested not have custom type. however, if problem, i'd expect see hint effect in error message.
if it's relevant, here's definition custom type:
create or replace type myschema.simplevarraycustomtype varray(100) of varchar2(5);
i have started getting same error, when enqueueing message udt. class defined udt missing constructor. think need class generated udt myschema.simplevarraycustomtype, instantiate object of class values, , assign param.value.
Comments
Post a Comment