Oracle out parameter cast - c# -


having issue older application supporting. data access csla .net , there line updates newly created entity id value out parameter. defined in database numeric(10,0). code looks this:

oracleparameter opid = new oracleparameter("p_id", oracledbtype.int64); //... stuff , save new entity db _id = (long)opid.value; 

this used fine on windows xp version 9.x of odp .net. on windows 7 box latest version cast fails , return data type of parameter decimal despite being explicitly declared int64. looks me bug/weird behavior in new version of odp .net. there workaround or can fix issue, preferably without changing code?

thanks!

this issue further detailed on oracle forums here: https://forums.oracle.com/forums/thread.jspa?threadid=406872;

there seems have been slight change affects how oracle data types being hadled. quick fix double cast (long)((oracledecimal)opid.value).


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

Delphi interface implements -

java - How to create Table using Apache PDFBox -