我试图通过Entity Framework会见Oracle 11g上的存储进程.我可以会见返回标量的存储进程,并返回正确的值.可是,当行使SYS_REFCURSOR返回功效集时,在函数导入时未检测到OUT参数.
我的存储进程如下
create or replace PROCEDURE "GetAllClientNames" (
"ID" IN NUMBER,"SAL" IN NUMBER,"EMP_CURSOR" OUT SYS_REFCURSOR) IS
BEGIN
OPEN EMP_CURSOR FOR SELECT FIRSTNAME FROM CLIENTS;
END;
可是在更新实体并执行函数导入时,导入的函数中未检测到SYS_REFCURSOR OUT参数以检索功效集.
请帮我办理这个题目.没有OUT参数我无法会见存储进程检索的功效集
此刻oracle数据提供措施应承这种操纵没有太多的喧哗.它在这里过于全心答复.添加了快速阅读.请凭证以下链接获取具体信息.
ODP.NET 11g Release 2 (11.2.0.3.0),and higher,enables applications to run stored procedures with REF CURSOR parameters without using explicit binding for these parameters in the .NET code.
For a read-only result set,such as a REF CURSOR using OracleDataReader,REF CURSOR schema information is retrieved automatically.
For some scenarios,such as when updateable REF CURSORs or Entity Framework is used,developers need to define the REF CURSOR schema information so that the application can bind the implicit REF CURSOR. Entity Framework applications use implicit REF CURSOR binding to instantiate complex types from REF CURSOR data. Applications must specify REF CURSOR bind and metadata information in the app.config, web.config,or machine.config .NET configuration file.
The attributes supplied in the .NET configuration file are also used when the application requests for schema information from the OracleDataReader object that represents a REF CURSOR. This means that for REF CURSORs that are created using a SELECT from a single table, the application can update that table through the use of OracleDataAdapter and OracleCommandBuilder.
When using the Entity Framework,function imports can return an implicitly-bound REF CURSOR. The REF CURSOR can be returned as a collection of complex types or entity types. To return a complex type collection,the .NET configuration file needs to define the REF CURSOR bind and metadata information. To return an entity type collection, only the bind information needs to be defined in the .NET configuration file.
查找完备信息here (编辑:湖南网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|