odp.net

Replacing System.Data.OracleClient to Oracle.DataAccess (ODP.NET)

好久不见. 提交于 2019-12-02 19:34:52
I have a project which is using System.Data.OracleClient at the moment and since it is being deprecated so I want to switch to the ODP.NET latest version for Oracle 11g. Please let me know if the following steps would work for me or there are certain other actions required to get it working without any errors: Remove the reference to the SYstem.Data.OracleClient Adding the reference to Oracle.DataAccess dll Replacing OracleType enum with OracleDbType and updating the references to datatypes from VarChar to Varchar2 etc. You've pretty much got it. Here's the Oracle writeup I followed when doing

Oracle.DataAccess.dll not shown in explorer although it is installed in GAC

ε祈祈猫儿з 提交于 2019-12-02 07:59:46
Does anybody know why my Oracle.DataAccess.dll Version 4 assemblies are not shown in explorer view. It is installed in GAC and working without any problems. gacutil shows it as expected. C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>gacutil /l Oracle Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.18020 Copyright (c) Microsoft Corporation. All rights reserved. The Global Assembly Cache contains the following assemblies: Number of items = 0 C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>gacutil /l Oracle.DataAccess Microsoft (R) .NET Global Assembly Cache

Oracle.ManagedDataAccess with Oracle 8.1.7 DB

三世轮回 提交于 2019-12-02 04:33:55
Is it at all possible to use Oracle.ManagedDataAccess with Oracle DB v.8.1.7? I've searched for hours, but failed to find a definitive answer anywhere. No. ODP.NET Managed Driver only supports databases back to 10.2. As it is a relatively new product, there aren't old versions to fall back on. The problem is the networking protocol changes over time and Oracle promises backward compatibility for two major versions. If you must use ODP.NET and Oracle Database 8.1.7, consider using ODP.NET Unmanaged driver version 10.2. It is still available here: http://www.oracle.com/technetwork/topics/dotnet

Converting oracle query into user defined types in pl/sql

别来无恙 提交于 2019-12-02 04:31:08
I have a select query on a relational table in a plsql procedure. I want to convert the results of this query into a user defined type object to return via odp.net. How would I go about doing this? (this is from one of my other post today) this is a walkthrough on getting started: http://www.oracle.com/technology/obe/hol08/dotnet/udt/udt_otn.htm while this is a bit more detailed: http://download.oracle.com/docs/html/E10927_01/featUDTs.htm but the real meat & potatoes are already installed on your computer after you install ODP in the Samples directory: %ORA_HOME%\product\11.1.0\client_1\odp

Oracle bulk updates using ODP.NET

大城市里の小女人 提交于 2019-12-02 04:13:55
问题 Looking at this example to do bulk inserts, I assumed using the same logic would work for updates. I tried to the following to see if it would work, and it does not: string sql = "update TEST set NAME=:newName where NAME=:name"; connection.Open(); OracleCommand command = connection.CreateCommand(); command.CommandText = sql; command.CommandType = System.Data.CommandType.Text; command.BindByName = true; command.ArrayBindCount = 5; string[] originalName = { "Test1", "Test2", "Test3", "Test4",

Oracle bulk updates using ODP.NET

落爺英雄遲暮 提交于 2019-12-02 01:58:38
Looking at this example to do bulk inserts, I assumed using the same logic would work for updates. I tried to the following to see if it would work, and it does not: string sql = "update TEST set NAME=:newName where NAME=:name"; connection.Open(); OracleCommand command = connection.CreateCommand(); command.CommandText = sql; command.CommandType = System.Data.CommandType.Text; command.BindByName = true; command.ArrayBindCount = 5; string[] originalName = { "Test1", "Test2", "Test3", "Test4", "Test5" }; string[] newName = { "New Test1", "New Test2", "New Test3", "New Test4", "New Test5" };

ORA-21700: object does not exist or is marked for delete for Associative Array as input parameter called from ODP.NET

若如初见. 提交于 2019-12-02 01:02:14
I have this package code on Oracle 12c CREATE OR REPLACE PACKAGE Support_Data_Types AS TYPE ttDate IS TABLE OF DATE END Support_Data_Types; PROCEDURE GetData ( tabDates IN SUPPORT_DATA_TYPES.TTDATE, ) AS BEGIN SELECT count(*) INTO n FROM table(tabDates); END GetData; If I call it from PL/SQL code it works declare dates SUPPORT_DATA_TYPES.TTDATE; begin dates(1) := To_DATE('12/31/2005','MM/DD/YYYY'); dates(2) := To_DATE('03/31/2006','MM/DD/YYYY'); dates(3) := To_DATE('06/30/2006','MM/DD/YYYY'); dates(4) := To_DATE('09/30/2006','MM/DD/YYYY'); MyPackage.GETVALUE(dates); end; But If I call it from

Unable to parse Oracle timestamp in C#

戏子无情 提交于 2019-12-01 21:00:23
I have timestamp of Oracle: string timestamp = "23-JUN-14 09.39.04.000000000 AM"; I am not able to parse it into system date time object. I used: CultureInfo provider = CultureInfo.InvariantCulture; String format = "yy-MMM-dd hh:mm:ss:fffffff"; string timestamp = "10-DEC-07 10.32.47.797201123 AM"; { var date = DateTime.ParseExact(timestamp, format, provider); DateTime dateTime = DateTime.ParseExact(timestamp.ToString(), "dd-MMM-y HH:mm:ss", CultureInfo.InvariantCulture); } It is still passing error. It is working 7 f after m but not more than that. I used try Parse , try ParseExact - is there

The Entity Framework provider type 'Oracle.ManagedDataAccess.EntityFramework' could not be loaded

流过昼夜 提交于 2019-12-01 20:47:27
问题 I am trying to connect to Oracle using the Oracle Data Provider.NET (ODP.NET) using Entity Framework v6 in an MVC application. I have installed ODP.NET from here: https://www.nuget.org/packages/odp.net.entityframework/6.121.1-beta I have configured my web.config file as follows: <connectionStrings> <add name="MyDB" connectionString="User ID=MyUser;Password=MyPassword;Data Source=MyDatabase; Persist Security Info=False" providerName="Oracle.ManagedDataAccess" /> </connectionStrings>

The Entity Framework provider type 'Oracle.ManagedDataAccess.EntityFramework' could not be loaded

為{幸葍}努か 提交于 2019-12-01 19:33:25
I am trying to connect to Oracle using the Oracle Data Provider.NET (ODP.NET) using Entity Framework v6 in an MVC application. I have installed ODP.NET from here: https://www.nuget.org/packages/odp.net.entityframework/6.121.1-beta I have configured my web.config file as follows: <connectionStrings> <add name="MyDB" connectionString="User ID=MyUser;Password=MyPassword;Data Source=MyDatabase; Persist Security Info=False" providerName="Oracle.ManagedDataAccess" /> </connectionStrings> <entityFramework> <providers> <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle