odp.net

EF + ODP.NET + CLOB = Value Cannot be Null - Parameter name: byteArray?

安稳与你 提交于 2019-11-30 07:11:01
问题 Our project recently updated to the newer Oracle.ManagedDataAccess DLL's (v 4.121.2.0) and this error has been cropping up intermittently. We've fixed it a few times without really knowing what we did to fix it. I'm fairly certain it's caused by CLOB fields being mapped to strings in Entity Framework, and then being selected in LINQ statements that pull entire entities instead of just a limited set of properties. Error: Value cannot be null. Parameter name: byteArray Stack Trace: at System

Why doesn't ODP.NET 11 xcopy deployment work on a machine with Oracle DB 10 installed?

倾然丶 夕夏残阳落幕 提交于 2019-11-30 07:04:01
问题 I have an app that uses a local version of ODAC 11 below the directory that the .exe file is in. The idea is that we want our app to use the local ODAC 11 regardless of what else the user has installed on her machine. Oracle.DataAccess.dll is in the same directory as the .exe. It works fine when the client machine has no Oracle client installed, but I get an error when starting it on a machine with Oracle Database 10.2.0.something installed: The type initializer for 'Oracle.DataAccess.Client

C# 2010, ODP.net, call stored procedure passing array

那年仲夏 提交于 2019-11-30 05:19:54
问题 I have a PL/SQL stored procedure that takes 4 inputs. One of those inputs is an associative array (Oracle Type: Table of VARCHAR2(1) index by PLS_INTEGER). I want to have a C# program that calls this stored procedure with the proper inputs including the associative array. I am using ODP.net 11.2 with Visual C# 2010 Express and Oracle 11gR2. I cannot find any good examples of how to pass an array to a pl/sql procedure from C#. Can anybody give me an example? Following Oracle Documentation

How does fetching data from SQL Server to SqlDataReader work?

为君一笑 提交于 2019-11-30 04:51:52
When I call this code: using (var connection = new SqlConnection(connectionString)) { var command = new SqlCommand("SELECT * FROM Table", connection); connection.Open(); using (var reader = command.ExecuteReader()) { while(reader.Read()) { // Do something here } } } what happens internally? How does this work on a network level? Will it make a new round trip to database for each call to Read or is there any batch read implemented internally? I'm asking because I just read that ODP.NET provides FetchSize property in both OracleCommand and OracleDataReader which I understand as definition of how

Issue with System.Data.OracleClient and ODP.Net 11g together used in .net 2.0 web site

允我心安 提交于 2019-11-29 17:08:40
In our .net framework 2.0 based application we were using System.Data.Oracleclient and now migrating to ODP.Net, the volume of the project is too high, so we cannot do the entire migration on one go, as a result the application is using 2 providers System.Data.Oracleclient & ODP.Net as of now. Now we are changing our OS, from Windows xp 32bit to Windows 7 64bit. While doing so we observed the following, 1) A query executes in < 1 sec using System.Data.Oracleclient & ODP.Net 10g 64bit (Oracle.DataAccess.dll version 2.102.2.20). and the same query executes in < 1 sec on Oracle SQL Developer v1.5

The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception

て烟熏妆下的殇ゞ 提交于 2019-11-29 16:58:27
问题 I have developed an application that uses Oracle Data Provider for .NET. I copy the application file (.exe) and ODP library (Oracle.DataAccess.dll) on another computer that Oracle client and ODP.NET are NOT installed on. When I run the application, I got the error msg: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. *****************Exception Text*************** System.TypeInitializationException: The type initlializer for 'Oracle.DataAccess.Client

Oracle ODP.Net and EF CodeFirst - SaveChanges Error

强颜欢笑 提交于 2019-11-29 16:12:55
Could someone help me with this: The code: Role r = new Role { ID = 1, Name = "Members" }; ctx.Roles.Attach(r); //Saving User User u = new User { Login = login, Password = password, Status = 1 }; u.Roles.Add(r); ctx.Users.Add(u); ctx.SaveChanges(); What I'm trying to do is to save a new user with an existing role. User and Role classes have a many-to-many relationship mapped by fluent-api as follows: modelBuilder.Entity<User>() .HasMany(u => u.Roles) .WithMany(r => r.Users) .Map(x => { x.ToTable("USER_ROLE_XREF", dbsch); x.MapLeftKey("ID_USER"); x.MapRightKey("ID_ROLE"); }); But when the

How to install ODP.NET 2.111 and ODP.NET 4.112 in the same machine side-by-side while both point to the same database server

痞子三分冷 提交于 2019-11-29 12:59:53
The question is how to install ODP.NET 2.111 and ODP.NET 4.112 in the same machine side-by-side while both point to the same database server using tnsnames.ora I need to support a legacy system based on Oracle 11.1.0. The system is using ODP.NET 2.111 to connect to oracle. There are two clients installed at: C:\oracle\product\11.1.0\client_1 C:\oracle\product\11.1.0\client_2 The tnsnames.ora for both is something like this: xxxx1_SERVICE= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxx2)(PORT = xxx3)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = xxx4) ) ) yyyy1_SERVICE = (DESCRIPTION =

Parser Error Message: Failed to generate code. Exception of type 'System.Data.Design.InternalException' was thrown

£可爱£侵袭症+ 提交于 2019-11-29 12:56:46
I am getting this error when I am using ODP.net The error is appearing when I include a connection <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="BannerCS" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="BannerCS (Web.config)" ParameterPrefix=":" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.BannerCS.ConnectionString" Provider="Oracle.ManagedDataAccess.Client" /> in the .XSD file in the website project I have the following connection in the web.config file <add name="BannerCS"

OracleConnection is throwing empty exception

一笑奈何 提交于 2019-11-29 12:13:31
I'm trying to connect to my Oracle Database from my new PC. I've just installed Visual Studio and the ODAC. But when I try to do a simple connect Im getting an exception with an empty message, empty source, empty number, just with the error code which is -2147467259 . OracleConnection Prueba; Prueba = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XXX.XXX.XXX.XXX)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXXX)));User Id=XXX;Password=XXX;Pooling=true;Max Pool Size=10;Min Pool Size=1"); Prueba.Open(); Exception Details This is the