asp.net mvc 4 - Operation is not valid due to the current state of the object in MVC4 in StoredProcedure -
i getting error [system.invalidoperationexception] = {"operation not valid due current state of object."}
i getting list of values contining datatype oracleclob
executing storedprocedure
here code
try { string connectionstrings = configurationmanager.connectionstrings["oracleconnection"].connectionstring; oracleconnection con = new oracleconnection(connectionstrings); con.open(); oraclecommand command = new oraclecommand(); command.commandtype = system.data.commandtype.storedprocedure; command.commandtext = "pkg_rtmi_web.prc_get_rtmi_signature"; command.parameters.add("p_masag", oracledbtype.varchar2).direction = system.data.parameterdirection.input; command.parameters["p_masag"].value = masagr_id; command.parameters.add("p_sig", oracledbtype.refcursor).direction = system.data.parameterdirection.output; oracledatareader dr = command.executereader(); con.close(); oracleclob clob = null; while(dr.read()) { clob = dr.getoracleclob(0); } return clob; } catch (exception ex) { /// exception block baseobject.issuccessful = false; baseobject.message = "[rtmisignature]: " + ex.message; return null; }
got error in line oracledatareader dr = command.executereader();
also added line web.config
<appsettings> <add key="aspnet:maxhttpcollectionkeys" value="15000" /> </appsettings>
but same results note: clob
contains more 12k characters
Comments
Post a Comment