不支持的列数据类型

时间:2015-07-02 12:55:22

标签: c# .net oracle

我的系统中安装了Oracle 12C。我创建了一个返回表的SP当我尝试在SQL Developer中执行它时,它给了我正确的结果,但是当我从我的DOTNET应用程序调用它时它给了我错误 - "不支持的列数据类型"。我正在尝试使用数据适配器填充数据集。要检查我评论过程中的所有代码,并使用下面的代码返回表。

Declare  
rc sys_refcursor;  
Begin  
   OPEN rc FOR SELECT 'Sayam' AS "Error" FROM dual;  
   SYS.DBMS_SQL.RETURN_RESULT (rc, TRUE) ;  
END;  

但问题仍然存在。下面是相同的痕迹。

  

发现了Oracle.ManagedDataAccess.Client.OracleException       的HResult = -1450       Message =不支持的列数据类型       Source = Oracle数据提供程序for .NET,托管驱动程序ErrorCode = -1450 DataSource =""数字= -1450程序=""
  堆栈跟踪:          在Oracle.ManagedDataAccess.Client.OracleParameter.PreBind(OracleConnectionImpl   connImpl,ColumnDescribeInfo cachedParamMetadata,Boolean&   bMetadataModified,Int32 arrayBindCount,ColumnDescribeInfo&   paramMetaData,Object& paramValue,Boolean isEFSelectStatement)          在OracleInternal.ServiceObjects.OracleCommandImpl.InitializeParamInfo(ICollection   paramColl,OracleConnectionImpl connectionImpl,ColumnDescribeInfo []   cachedParamMetadata,Boolean& bMetadataModified,布尔值   isEFSelectStatement,MarshalBindParameterValueHelper&   marshalBindValuesHelper)          在OracleInternal.ServiceObjects.OracleCommandImpl.ProcessParameters(OracleParameterCollection   paramColl,OracleConnectionImpl connectionImpl,ColumnDescribeInfo []   cachedParamMetadata,Boolean& bBindMetadataModified,布尔值   isEFSelectStatement,MarshalBindParameterValueHelper&   marshalBindValuesHelper,Boolean& bAllInputBinds)          at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String   commandText,OracleParameterCollection paramColl,CommandType   commandType,OracleConnectionImpl connectionImpl,   OracleDataReaderImpl和放大器; rdrImpl,Int32 longFetchSize,Int64   clientInitialLOBFS,OracleDependencyImpl orclDependencyImpl,Int64 []   scnForExecution,Int64 []& scnFromExecution,OracleParameterCollection&   bindByPositionParamColl,Boolean& bBindParamPresent,Int64&   internalInitialLOBFS,OracleException& exceptionForArrayBindDML,   Boolean isDescribeOnly,Boolean isFromEF)          在Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(布尔值   requery,Boolean fillRequest,CommandBehavior behavior)          在Oracle.ManagedDataAccess.Client.OracleDataAdapter.Fill(DataSet   dataSet,Int32 startRecord,Int32 maxRecords,String srcTable,   IDbCommand命令,CommandBehavior行为)          在System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)          at DataAccessLayer.DataAccessService.OracleGetData_Load(String SPName,XElement QueryParam,Exception& e,Boolean bFlag)in   d:\ Sayam \月\多重\ DataAccessLayer \ DataAccessLayer \ DAS.cs:行   187

我也试过这个链接。

Unsupported column datatype ODP.NET

如果我需要改变任何地方,请告诉我。

 using Oracle.ManagedDataAccess.Client;

并且代码

                if (this.ConOracle.State == ConnectionState.Closed)
                    ConOracle.Open();
                oraCmd.Connection = ConOracle;
                oraCmd.CommandTimeout = 0;
                oraCmd.CommandType = CommandType.StoredProcedure;
                OracleGetQuery(ref oraCmd, SPName.Split('.')[1],QueryParam);

                using (OracleDataAdapter oraDA = new OracleDataAdapter(oraCmd))
                { oraDA.Fill(ds); }

由于 Sayam

1 个答案:

答案 0 :(得分:0)

您好我搜索了几天,发现我需要从下面的链接安装软件包,它运行正常。

http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

由于