This question is locked. New answers and comments are not allowed.
Hi Telerik Forum,
Please could someone help me in the right direction, I seem to be missing something simple but I keep running into the following error:
An unhandled exception of type 'System.InvalidCastException' occurred in Oracle.ManagedDataAccess.dll
Additional information: Unable to cast object of type 'Oracle.DataAccess.Client.OracleParameter' to type 'Oracle.ManagedDataAccess.Client.OracleParameter'.
I am using Oracle XE 11g Release 2 with a test stored procedure which returns a ref cursor. When I add the stored procedure to the entities model and create the domain method it generates the following in the EntitiesModel.cs:
I've downloaded and installed the following ODP.NET: ODAC 12c Release 2 and Oracle Developer Tools for Visual Studio (12.1.0.1.2) [Released December 20, 2013]
And have looked at http://docs.telerik.com/data-access/developers-guide/database-specifics/oracle/data-access-tasks-consume-oracle-managed-driver for any guidenance but no such luck.
I did not see any mention of using different assemblies or changing any settings and strikes me as strange that the OracleParameter is forcifully created as Oracle.DataAccess.Client.OracleParameter.
Any help would be greatly appreciated!
Please could someone help me in the right direction, I seem to be missing something simple but I keep running into the following error:
An unhandled exception of type 'System.InvalidCastException' occurred in Oracle.ManagedDataAccess.dll
Additional information: Unable to cast object of type 'Oracle.DataAccess.Client.OracleParameter' to type 'Oracle.ManagedDataAccess.Client.OracleParameter'.
I am using Oracle XE 11g Release 2 with a test stored procedure which returns a ref cursor. When I add the stored procedure to the entities model and create the domain method it generates the following in the EntitiesModel.cs:
01.
public
IEnumerable<BOOK> SPSINGLEREFCUR()
02.
{
03.
// Oracle.DataAccess assembly reference is required
04.
Oracle.DataAccess.Client.OracleParameter parameterBOOKSCUR =
new
Oracle.DataAccess.Client.OracleParameter();
05.
parameterBOOKSCUR.ParameterName =
"BOOKSCUR"
;
06.
parameterBOOKSCUR.OracleDbType = Oracle.DataAccess.Client.OracleDbType.RefCursor;
07.
parameterBOOKSCUR.Direction = ParameterDirection.Output;
08.
09.
IEnumerable<BOOK> queryResult =
this
.ExecuteQuery<BOOK>(
"\"SYSTEM\".\"SPSINGLEREFCUR\""
, CommandType.StoredProcedure, parameterBOOKSCUR);
10.
11.
12.
return
queryResult;
13.
}
I've downloaded and installed the following ODP.NET: ODAC 12c Release 2 and Oracle Developer Tools for Visual Studio (12.1.0.1.2) [Released December 20, 2013]
And have looked at http://docs.telerik.com/data-access/developers-guide/database-specifics/oracle/data-access-tasks-consume-oracle-managed-driver for any guidenance but no such luck.
I did not see any mention of using different assemblies or changing any settings and strikes me as strange that the OracleParameter is forcifully created as Oracle.DataAccess.Client.OracleParameter.
Any help would be greatly appreciated!