Out parameter cast issue - C#
1005328Apr 24 2013 — edited Apr 30 2013Hi all,
Having an issue with an older application I am supporting. The data access is CSLA .Net and there is a line that updates a newly created entity id with the value from an out parameter. This is defined in the database as NUMERIC(10,0). The code looks like this:
OracleParameter opID = new OracleParameter("P_ID", OracleDbType.Int64);
//... do some stuff and save the new entity to the db
_id = (long)opID.Value;
This used to be fine on windows XP with version 9.x of ODP .Net. On a Windows 7 box with the latest version the cast fails and the return data type Decimal. This looks to me like a bug/weird behavior in the new version. Is there a workaround or something I can do to fix the issue without, preferably without changing my code?
Thanks!
Matei
Edited by: Matei on Apr 29, 2013 4:05 PM