odp.net

OracleDataReader Exception when Select a Blob type Column

吃可爱长大的小学妹 提交于 2020-04-17 22:51:57
问题 I'm attempting to retrieve an EmptyBLOB from an Oracle database to next write a byte array on that column but I keep getting an Exception Message "ORA-03135: Connection lost contact" in the oracle Data Reader when ExecuteReader. If I select any other column of the table in the statement it works fine. The oracle database is 10g 10.2.0.4.0 - 64bit and I'm using the Oracle.ManagedDataAccess as ODP for .NET oracleConnection.Open(); OracleCommand nameFile = oracleConnection.CreateCommand();

Setting fetch size in entity framework

流过昼夜 提交于 2020-02-24 11:15:29
问题 I am converting ado.net code to use EF. In my ado.net code i set dataReader.FetchSize = command.RowSize * 1000 and that dramatically improves performance over the default fetch size . When I convert my code to EF, the performance is on par to ado.net code where I didn't specify fetch size, i.e. it's very slow over large records. Any way I could specify fetch size for retrieving records in EF? 回答1: You can set ODP.NET FetchSize in the Registry or the .NET config files when using Entity

ODP.NET Managed Driver has no OracleDbType.Object, what's the equivalent?

ぐ巨炮叔叔 提交于 2020-02-06 07:43:31
问题 I want to upgrade some ODP .NET code (Oracle 11 unmanaged driver) to the managed one from Oracle 12. But the code does not compile because there is no such thing as OracleDbType.Object any more. And I need to handle user-defined types coming back to .NET, as well as ref cursors of objects. According to Oracle: https://docs.oracle.com/cd/E48297_01/doc/win.121/e41125/OracleDbTypeEnumerationType.htm#i1017320 "Not Available in ODP.NET, Managed Driver" Is there some suggested way to handle these?

ODP.NET Managed Driver has no OracleDbType.Object, what's the equivalent?

↘锁芯ラ 提交于 2020-02-06 07:43:10
问题 I want to upgrade some ODP .NET code (Oracle 11 unmanaged driver) to the managed one from Oracle 12. But the code does not compile because there is no such thing as OracleDbType.Object any more. And I need to handle user-defined types coming back to .NET, as well as ref cursors of objects. According to Oracle: https://docs.oracle.com/cd/E48297_01/doc/win.121/e41125/OracleDbTypeEnumerationType.htm#i1017320 "Not Available in ODP.NET, Managed Driver" Is there some suggested way to handle these?

Pass datatable to refcursor of Oracle stored procedure

落爺英雄遲暮 提交于 2020-01-17 03:53:25
问题 I am using ODP.NET and Oracle 11g client. I am passing a datatable to a procedure with a refcursor as input. dtSample is DataTable with four columns called Type , Name , Size and Description . I got error Invalid parameter binding, Parameter name: ParameterName at the line db.ExecuteNonQuery(oracleCommand); Full code: OracleCommand oracleCommand = new OracleCommand(); oracleCommand.CommandType = CommandType.StoredProcedure; oracleCommand.CommandText = "PCK_ADMIN.PROC_INS"; oracleCommand

What is difference between Oracle session and Oracle Connection Or Both are the same..?

流过昼夜 提交于 2020-01-16 14:41:10
问题 I m using the Enterprise lib to connect Oracle Database class Customer{ private readonly Database _db; public Customer(){ _db = = DatabaseFactory.CreateDatabase(_userSettings.ConnstringName); } .. stuff to use this connection.. } When I run the application and opens multiple screen now Oracle show multiple session for same Application Also I tried by changing code as class Customer{ private readonly Database _db; public Customer(){ _db = = (_userSettings.GetInstance().GetDatabase); } .. stuff

ODP.Net - Calling stored procedure with custom type parameter throws ORA-06550/PLS-00306

我的梦境 提交于 2020-01-15 11:46:05
问题 I'm trying to call a stored procedure that takes a SYS_REFCURSOR output parameter and an input parameter with a custom type. Right now when I try to call the procedure from my application I get this error: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SP_TEST_01' ORA-06550: line 1, column 7: PL/SQL: Statement ignored This is the PL/SQL script that creates the custom type and the stored procedure I'm trying to call: CREATE OR REPLACE TYPE t_string_list

Using a ref cursor as input type with ODP.NET

岁酱吖の 提交于 2020-01-15 03:24:14
问题 I'm trying to use a RefCursor as an input parameter on an Oracle stored procedure. The idea is to select a group of records, feed them into the stored procedure and then the SP loops over the input RefCursor , doing some operations to its records. No, I can't select the records inside the SP and thus avoid having to use the RefCursor as an input type. I've found an example on how to do this on (this here would be the link, but it seems I cannot use them yet) Oracle's documentation, but it

Using Oracle with EF code first

北战南征 提交于 2020-01-14 03:04:28
问题 I wrote a project with EF code first 6 and SQL Server 2008R2 for a company, Now the company wants to switch its DB to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 , How could I find appropriate version of ODP.NET or ODAC ? Could I use ODAC 12c or any other versions for Oracle 10g or each Oracle version has its own ODAC version? 回答1: You could just rely on the last version of odp.net managed driver but beware that some features might not be available on your 10g (like APPLY)

Timeout for OracleDataReader.Read Method

◇◆丶佛笑我妖孽 提交于 2020-01-09 11:08:53
问题 The ODP.NET OracleCommand class has a CommandTimeout property that can be used to enforce a timeout for the execution of a command. This property seems to work in situations where the CommandText is a SQL statement. The example code is used to illustrate this property in action. In the initial version of the code, the CommandTimeout is set to zero - telling ODP.NET not to enforce a timeout. using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using