【问题标题】:Oracle.ManagedDataAccess.Core (Odp.Net Core) User Defined Type and Associative Array TypeOracle.ManagedDataAccess.Core (Odp.Net Core) 用户定义类型和关联数组类型
【发布时间】:2019-12-16 14:27:45
【问题描述】:

我想通过 Oracle.ManagedDataAccess.Core (Odp.Net Core) 将用户定义的类型或具有类型的关联数组传递给 dotnet 核心中的存储过程。但我找不到任何明确的例子。

有没有 Odp.net Core 支持用户定义类型或关联数组类型,我不知道。

这是我的类型;

TYPE TYP_BC_RECORD is record (
      unique_id             depo.bc_stok_har.unique_id%type,
      transaction_hash      depo.bc_stok_har.transaction_hash%type,
      transaction_error     depo.bc_stok_har.transaction_error%type
 );
 TYPE TABLE_TYPE_BCRECORD IS TABLE OF TYP_BC_RECORD;

存储过程参数;

PROCEDURE P_SetResultBcHksRecordList(arBC_RECORD TABLE_TYPE_BCRECORD);

和dotnet核心代码;

OracleCommand OCommAPI = new 
OracleCommand("Depo.SPHKSBLOCKCHAIN.P_SetResultBcHksRecordList", conn);
OCommAPI.CommandType = CommandType.StoredProcedure;


OracleParameter arBC_RECORD = new OracleParameter
{
  OracleDbType = ?,
  ParameterName = "arBC_RECORD ",
  //I don't know what I suppossed to write here. ?
  //RetUniqueID.Value = item;
  Direction = ParameterDirection.Input
};
CommAPI.Parameters.Add(arBC_RECORD);
.
.
.

【问题讨论】:

    标签: asp.net-core plsql .net-core user-defined-types odp.net-managed


    【解决方案1】:

    简短的回答 - 不。 ODP.NET 不支持自定义类型。 See what was supported.

    Oracle docs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-14
      • 2021-10-31
      • 1970-01-01
      • 1970-01-01
      • 2010-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多