App.config tag oracle.dataaccess.client not recognized on windows 7...
Hi all,
I have an application that is working fine on windows XP. On windows 7, the same application cannot work cause of the tag oracle.dataaccess.client you can see below which is not recognized by the system. As soon as I start the application I get an error
message
Unrecognized configuration section oracle.dataaccess.client. Can someone help please before I get nuts.
<oracle.dataaccess.client>
<settings>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_GROUPS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_GROUP_MEMBERS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_OBJECTS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_RIGHTS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_RIGHT_GROUPS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
<add name=""EA_SERVICES"."SLI_SECURITY_PKG"."SEC_USERS_ADD".RefCursor.OUTPARAM" value="implicitRefCursor bindinfo='mode=Output'"/>
</settings>
</oracle.dataaccess.client>
Sherman Body love
Since this is an oracle section, I think you'll get more help over at the oracle forums.
https://community.oracle.com/community/developer/english/oracle_database/windows_and_.net/oracle_developer_tools_for_visual_studio
I would check the versions of the odp.net (oracle.dataaccess.dll) on both machines. The XP machine probably has the 11g client on it. And the windows 7 machine probably has the 12c client on it.
Similar Messages
-
oracle.dataaccess.client not recognized in app.config for edmMapping
Hi,
I installed ODTwithODAC112030 EF provider release version.
So I want to use custom EDM Mapping for boolean or something else.
But Entity Data Model can't recognize
<oracle.dataaccess.client>
<settings>
section in appConfig file.
I'm using Win 7 x64 , VS 2010 and x86 odac components.
How can i resolve this problem.
Thank you..Would you please do a simple test like follows?
1. create test table
create table test_table (c1 number(4) primary key not null, c2 number(1, 0), c3 number(2), c4 number(5, 0), c5 number(10, 0), c6 number(19, 0));
2. create a C# Console application and create a data model from test_table.
Because there is no custom type mapping specified in app.config, default mapping is used in the model.
Your CSDL section in Model1.edmx should show:
<EntityType Name="TEST_TABLE">
<Key>
<PropertyRef Name="C1" />
</Key>
<Property Name="C1" Type="Int16" Nullable="false" />
<Property Name="C2" Type="Int16" />
<Property Name="C3" Type="Int16" />
<Property Name="C4" Type="Int16" />
<Property Name="C5" Type="Int32" />
<Property Name="C6" Type="Int64" />
</EntityType>
3. Delete Model1.edmx.
4. Open app.config and add the following below </connectionStrings> and above </configuration>. Save changes.
<oracle.dataaccess.client>
<settings>
<add name="bool" value="edmmapping number(1, 0)" />
<add name="byte" value="edmmapping number(3, 0)" />
<add name="int16" value="edmmapping number(4, 0)" />
<add name="int32" value="edmmapping number(9, 0)" />
<add name="int64" value="edmmapping number(18, 0)" />
</settings>
</oracle.dataaccess.client>
5. Create a data model from test_table again.
The new model should be using your custom type mapping.
Your CSDL section in Model1.edmx should show:
<EntityType Name="TEST_TABLE">
<Key>
<PropertyRef Name="C1" />
</Key>
<Property Name="C1" Type="Int16" Nullable="false" />
<Property Name="C2" Type="Boolean" />
<Property Name="C3" Type="Byte" />
<Property Name="C4" Type="Int32" />
<Property Name="C5" Type="Int64" />
<Property Name="C6" Type="Decimal" Precision="19" Scale="0" />
</EntityType>
If it does not work for you, you may want to check the version of your Oracle.DataAccess.dll in the GAC.
gacutil /l Oracle.DataAccess
Or change the timestamp of app.config.
touch.exe app.config -
Oracle.DataAccess.Client not found[SOLVED]
Hello,
I am trying to run a stored procedure using C# and I need to use the Oracle.DataAccess.Client but when i enter
"using Oracle.DataAccess.Client;" visual studio throws the error:
Error 1 The type or namespace name 'Oracle' could not be found (are you missing a using directive or an assembly reference?) P:\data\ActionItemLog\ActionItemLog\updateComment.aspx.cs 14 7 ActionItemLog
And I installed the newest ODTwithODP for .NET. I would really like some help on this subject and I will do my best to clarify even more if needed.
Thanks in advance,
Dylan
Message was edited by:
dkroyJust a stupid mistake on my part all I had to do is in visual studio add the Oracle.DataAccess.dll file to references. I hope this mistake saves some one a bit of time in the future.
-
Oracle 10g Client not working in Windows 7 64 bit
Dear All,
Not ablle to install Oracle 10g Client (Rel 2) in Windows 7 64 bit , getting an abnormal error and stoping ..
Please suggest me how to proceed futher823755 wrote:
Dear All,
Not ablle to install Oracle 10g Client (Rel 2) in Windows 7 64 bit , getting an abnormal error and stoping ..
Please suggest me how to proceed futherWhich Edition of Windows 7?
Where version of Oracle to four decimal places; i.e. V10.2.0.1 -
OdpNetWs: can not find Oracle.DataAccess.Client
When I try to compile ODPService.asmx are shown compilation erros "Namespace or type Client for namespace Oracle.DataAccess.Client cannot be found"
When I compile C# sample projects (DSPopulate) sach error does not present.
assembly Oracle.DataAccess setted via .NET Framework configuration (Oracle.DataAccess.dll in PATH environment variable)By tha way if i create a user user1....how do i grant
all the
necessary privileges from ctxsys schema/user in order
to be
able to run an Oracle Text Apps?You shouldn't have to do anything. When you create a new workspace, the workspace user (the oracle account) has the right privileges.
You can just create a new workspace and run the following example:
CREATE TABLE TEST(nr NUMBER PRIMARY KEY, test_text VARCHAR2(500))
INSERT INTO TEST
VALUES (1, 'This is a test');
INSERT INTO TEST
VALUES (2, 'of the InterMedia text installation')
COMMIT
CREATE INDEX test_idx ON TEST(test_text) INDEXTYPE IS ctxsys.CONTEXT
SELECT nr, test_text
FROM TEST
WHERE contains (test_text, 'installation') > 0
Yes its 10.2. the welcome web login window shows
version 10.2Sorry, but this is not what I have asked you to do (already twice) . I am getting a bit frustrated here and I really want to help you.
But you see, sometimes it is only details that mess up everything.
I assume you have mixed the versions of the base install and the companion cd install disk. I might be wrong in my assumptions but we have to get clear on the facts.
I cannot look at your machine so you have to help me to be able to help you.
Please do the following
1) run the following command on your instance as a dba (sys or system):
SQL> select version from v$instance;
VERSION
10.2.0.1.02) start the universal installer of your companion cd and post the output.
Preparing to launch Oracle Universal Installer from
/tmp/OraInstall2006-01-11_10-32-25AM. Please wait ...[oracle@daust companion]$
Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.As I've said, I might be wrong in my assumptions. So, prove me wrong and let's move ahead :).
~Dietmar. -
Oracle.DataAccess.Client.OracleException: The provider is not compatible
I am getting an error, and I don't understand why I'm getting it.
Error:
Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
Environment:
ODP.NET, 10.2.0.2 (ODTwithODAC10202.exe install)
Oracle 9i database
Windows 2000, .NET 1.x framework
Before ODP.NET, Oracle 9.2 client
Server does not have Visual Studio installed
Just installed ODP.NET today; any time I attempt to access OracleConnection, I get the error above. I am a newbie to server installations; if something is obvious to you, it might not be obvious to me, so feel free to point out even the most basic things.
I did install ODP.NET (same version) on my own PC several months ago, running over the same database, and everything seems to be working fine...
Message was edited by:
user531571Yeah; apparently, the Oracle install on that server was known (by everyone but me, from the sounds of it) to be exceptionally fragile. Installing ODP.NET brought down all Oracle connections. Uninstalling ODP.NET broke (actually, shattered might be closer to the truth) the Oracle instance on that box. Our solution? Start from scratch with a new server. Another piece of information which would have been nice to know is that they were looking for an excuse to get rid of this server; I wouldn't have been running around like a madman trying to fix it (and stressing all the while).
So, the problem has been solved, but not in any kind of normal fashion. -
Oracle.DataAccess.Client.OracleDataAdapter.Update not working
Hi
I am using the Oracle.DataAccess.Client.OracleDataAdapter from Oracle.DataAccess runtime version v4.0.30319. I set the SelectCommand and retrieve data from Oracle without any problems using the adapter to fill a datatable. I then use the DataTable.Clear method to remove all rows and fill it again from a different source using a different adapter. I use the Oracle.DataAccess.Client.OracleCommandBuilder to create the Insert and Update commands and finally I call the update command of the using the original adapter in order to update the Oracle database but nothing is updated.
I examine the table row count at each stage and also display the table using a DataGridView on a form and all appears to be fine. No exception is thrown so I am stumped.
I would be grateful for any suggestions as to what I am doing wrong.
My environment is VS2010 Express
Edited by: user1947494 on 04-Feb-2011 05:46Hi,
Pretty tough without seeing any code. I really do not believe it has anything to do with the DataAdapter. What changed the specific row/rows after the second fill?
But, as a guess, take a look at the DataTable - Rows - RowState. Run the below(or some variant) method just prior to your update.
r,
dennis
public static DataTable GetDataTableChanges_Modified(DataSet dataSet, string dataTableName)
if (dataSet.Tables[dataTableName].Rows.Count > 0)
DataTable dt = dataSet.Tables[dataTableName].Clone(); ;
int c = 0;
foreach (DataRow r in dataSet.Tables[dataTableName].Rows)
DataRowState state = r.RowState;
switch (state)
case DataRowState.Modified:
DataRow anewrow_dr = dt.NewRow();
anewrow_dr.ItemArray = r.ItemArray;
dt.Rows.Add(anewrow_dr);
c = c + 1;
break;
default:
break;
if (c > 0)
return dt;
else
return null;
else
return null;
} -
Oracle.DataAccess.Client.OracleException not compatible version
Hi,
i have installed the oracle developer tools for VS2005.NET. In my programms i put a reference to the Oracle.DataAccess.dll Version 2.102.2.20 in my Project. I can start and run this Programm on the same PC without problems.
If i copy the Programm-Exe and the Oracle.DataAccess.dll on an other PC and start this Programm there, i became a Error-Message:
"Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisier
er für Oracle.DataAccess.Client.OracleConnection hat eine Ausnahme verursacht. -
--> Oracle.DataAccess.Client.OracleException The provider is not compatible with
the version of Oracle client bei Oracle.DataAccess.Client.OracleInit.Initial
ize()"
Is there anybody that can help me?
thanks,
CarstenYou need to run the installer to install ODP.NET on the target machine. Simply copying a few files is not good enough (at least not until we support xcopy instant client).
-
Oracle.DataAccess.Client.OracleConnection
I have been reading for hours and just cant seem to make this work. I have a window app that used the ORACLEDATAACESS.dll it works great on the pc. i made the APP but when i try to redistribute i get this nasty message. I read from these forums that i should install the ODP.net net on the computer that will get the installation and i have done that but i cant see to get anywhere. Can someone please give me a tip and point out the obvious i just dont know what to do anymore. t
System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleConnection..cctor()
--- End of inner exception stack trace ---
at Oracle.DataAccess.Client.OracleConnection.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
Notepad
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/JAM/My%20Notepad/Notepad.exe
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
Oracle.DataAccess
Assembly Version: 2.111.7.10
Win32 Version: 2.111.7.10
CodeBase: file:///C:/Program%20Files/JAM/My%20Notepad/Oracle.DataAccess.DLL
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.Oh interesting. I imagine there's a lot of ways that issue could crop up. Thanks!
I am driving myself completely out of my mind having tried to move a "solution" from one computer
to another. That is not a nobrainer. I ran into an issue on my home computer that defied all efforts to
stop it (the cursed varchar columns) so I decided to give up and do the development at work. But the project has not liked the
move. That is such an issue for an faq: how to design your project and whatever so that it can be
moved from one development location to another, one database to another, and then,
how to deploy it. And yeah now that you mention it differences in drive letters might well be a
factor here. :-( -
Oracle.DataAccess.Client.OracleException ORA-29875 - ODCIINDEXINSERT error
Hi,
We are migrating data into our GIS repository using an application witch uses ODP fro .NET.
Yesterday, when we were importing parcels from a certain geographic zone we have got this error:
4430528 [4028] ERROR DBCommand - Error Executing Command [PARCELA.WRITE]
Parameters:
ResValue: [Int32]
POP_ID: [Int64]35397
PAR_ID: [Varchar2]
BLO_ID: [Decimal]836170
PAR_NUM: [Varchar2]1480296132900
geometry: [Blob]System.Byte[]
PAR_PON_ETI: [Blob]System.Byte[]
Oracle.DataAccess.Client.OracleException ORA-29875: failed in the execution of t
he ODCIINDEXINSERT routine
ORA-29400: data cartridge error
ORA-14450: attempt to access a transactional temp table already in use
ORA-06512: at "MDSYS.SDO_IDX", line 161
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 332
ORA-06512: at "SIG.PARCELA", line 354
ORA-06512: at "SIG.PARCELA", line 479
ORA-06512: at line 1 at pt.inga.db.Command.Execute(IDbConnection connection,
IDbCommand command, Boolean& closeConnection) in C:\code-base\inga\isig\src-1.0.
0.2\pt\inga\db\Command.cs:line 234
at pt.inga.db.Command.Execute(IDbConnection connection, OracleCommand command
, IDataRecord parentRecord, IDataRecord dataRecord, IOperationData operation, Bo
olean& closeConnection) in C:\code-base\inga\isig\src-1.0.0.2\pt\inga\db\Command
.cs:line 334
The error seems to be related with temporary tables manipulation, does it?
Has we didnât know what to do we try to import those parcels after dropping a spatial index over the parcelâs table and we succeed with the import.
Those any one has any ideas about this?
And about spatial indexes internals?
Thanks in advance,
Vitor
Versions:
Client: Oracle10g Data Provider for .NET 10.1.0.2.0
Clientâs OS: Windows 2003 server
Server: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Serverâs OS: AIX 5.2.0.0Vitor,
Yes, Oracle uses temporary tables as part of inserts/
deletes/updates on a table with a spatial index.
Temporary table usage internally should not
have any issues and we are not sure why this problem
surfaces. Opening a TAR on this with a simplified
testcase (and all config details: # of concurrent
sessions etc.) might help in a better understanding/
resolution of this issue.
In the meanwhile, as a workaround, you can do the
following:
- drop the spatial index
- migrate (insert) the data into the table from the
application
- recreate the spatial index
This will avoid the temporary table issue at hand.
- Ravi. -
Oracle.DataAccess.Client - DbProviderFactories.GetFactory
Hello
I was inspired by this article http://www.oracle.com/technology/oramag/oracle/06-winsupp/win06odp.html
And been trying to switch my project over from "System.Data.OracleClient" (seems like it's not friendly with TransactionScope) to ODP.NET "Oracle.DataAccess.Client". I failed from get go:
Code:
DbProviderFactory oDbFactory = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
Keep getting System.Configuration.ConfigurationErrorsException saying:
+"Failed to find or load the registered .Net Framework Data Provider."+
In my futile attempt to resolve this:
STEP 1: In machine.config
* Under \\configuration\configSections\, *add:
<section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
* Under ..\system.data\DbProviderFactories\, *add:
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description=".Net Framework Data Provider for Oracle" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342" />
STEP 2: I checked my assembly cache it's there:
Code:
D:\Program Files\Microsoft Visual Studio 9.0\VC>gacutil /l | findstr Oracle
System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77
a5c561934e089, processorArchitecture=x86
CoreLab.Oracle, Version=3.50.12.0, Culture=neutral, PublicKeyToken=09af7300eec
+23701, processorArchitecture=MSIL+
Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f
+429c47342+
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=de, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=es, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=fr, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=it, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=ja, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=ko, PublicKeyToken=89
b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=pt-BR, PublicKeyToken
+=89b483f429c47342+
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=zh-CHS, PublicKeyToke
n=89b483f429c47342
Oracle.DataAccess.resources, Version=10.2.0.100, Culture=zh-CHT, PublicKeyToke
n=89b483f429c47342
Policy.9.2.Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyTo
ken=89b483f429c47342
See, I'm sure the assembly has been installed and in machine.config I used the right key/version. Weird thing is, Red Gate's reflector won't allow me to "Open" (from Cache) the dll, this prevented me to check if there exists "Oracle.DataAccess.Client.OracleClientFactory" within the assembly. So I select "Copy Local" and examined the dll from "Red Gates Reflector". There's no "Oracle.DataAccess.Client.OracleClientFactory" in the dll ???
RedGates Reflector - Screencap:
http://www.codeguru.com/forum/showthread.php?p=1831221#post1831221
STEP 3. Somebody advised to check and make sure "msvcr71.dll" is found under "ORACLE_HOME\bin" and if not copy from "D:\WINDOWS\system32". I did, it's ALREADY there.
REF:
http://www.oracle.com/technology/ora.../win06odp.html
http://social.msdn.microsoft.com/For...7-92c63ac82144
http://forums.oracle.com/forums/thre...89702�
Edited by: devvvy on Apr 9, 2009 2:57 AMThanks just installed from http://www.oracle.com/technology/software/tech/dotnet/utilsoft.html
It seems version is "2.111.6.20" - from machine.config there's a new line
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342" />
i added reference to it from Visual Studio. It's working now.
There were two options: one for client, the other for server. I don't understand what it means but stick to "Client" which was the default. Is this okay?
At the end there was a reminder "Run Oracle Providers for ASP.NET SQL scripts located in D:\OracleODPNET\ASP.NET\SQL directory."
Anyway, I'm verrrry glad this is working now many thanks!!! (I feel like 10 years older) -
Hi, I'm a newbie using Oracle ODP.NET provider for .NET.
We have a web application that uses XSD to connect to Oracle using the provider System.Data.OracleClient.
We want to migrate from System.Data.OracleClient to Oracle.DataAccess.Client.
Installing and referencing the Oracle.DataAccess.dll all works fine.
Then I changed all the references from System.Data.OracleClient to Oracle.DataAccess.Client and removed the System.Data.OracleClient.dll assembly from the web.config file.
All compiles well, until I run the application, looks like the problem is the parameter use in the XSD file... the error I get is:
Server Error in '/src' Application.
Value does not fall within the expected range.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Value does not fall within the expected range.
Source Error:
Line 8864: global::Oracle.DataAccess.Client.OracleParameter param = new global::Oracle.DataAccess.Client.OracleParameter();
Line 8865: param.ParameterName = "Original_TIPOCOMISIONID";
Line 8866: param.DbType = global::System.Data.DbType.VarNumeric;
Line 8867: param.IsNullable = true;
Line 8868: param.SourceColumn = "TIPOCOMISIONID";
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs Line: 8866
Stack Trace:
[ArgumentException: Value does not fall within the expected range.]
Oracle.DataAccess.Client.OracleParameter.set_DbType(DbType value) +134
dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.InitAdapter() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8866
dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.get_Adapter() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8797
dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.GetData() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8993
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +488
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1247
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +95
System.Web.UI.WebControls.ListControl.PerformSelect() +34
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +18
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614
I'd like some help on how to make the XSD compile with the new provider, Oracle.DataAccess.Client.
Many thanks in advance for any help!
PieterMS OracleClient binds parameters by name. ODP.NET binds by position. If you want to change ODP.NET's default parameter binding behavior, set:
OracleCommand.BindByName = true;
Do this for every OracleCommand that binds parameters. -
I'm building a new .sln file and it gave me an error in a file that referenced the following:
<Schema Namespace="Model.Store" Alias="Self" Provider="Oracle.DataAccess.Client" ProviderManifestToken="11.2" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
It seemed to be complaining that it could not fine the assembly associated with the provider. I installed the Oracle Data Provider installation package and rebuilt and it was working fine. What I wanted to know is where is this assembly. I cannot locate it on my laptop. I did see a reference regarding "Configuration File Support and Search Order for Unmanaged DLLs". It stated:
The Oracle.DataAccess.dll searches for dependent unmanaged DLLs (such as Oracle Client) based on the following order:
1. Directory of the application or executable.
2. DllPath setting specified by application config or web.config.
3. DllPath setting specified by machine.config.
4. DllPath setting specified by the Windows Registry.
HKEY_LOCAL_ MACHINE\Software\Oracle\ODP.NET\version\DllPath
5. Directories specified by the Windows PATH environment variable.
I did see where the installation package modified the machine..config file. Can somebody tell me how the reference tot eh "missing" assembly is resolved?
Thanks, EricOracle.DataAccess.dll is usually in the ODP.NET\bin folder of your Oracle installation. There's one for .net 2 and another for .net 4.
-
DBProviderFactories.GetFactory("Oracle.DataAccess.Client") very slow
The call to System.Data.Common.DBProvidersFactories.GetFactory("Oracle.DataAccess.Client") is taking over 2 minutes to return on my computer. By comparison, calls to GetFactory() for the System.Data.SqlClient and IBM.Data.DB2 takes less than a second.
Even more strange, the same call is very fast if I am running the code inside of the VS2010 debugger.
ODAC version 11.2.0.1.2 (32bit version)
Windows 7 64 bit
.NET 3.5 SP1
Oracle server - not relevant since test pgm is not connecting to a serve.
Code developed with VS 2010.
Test pgm built with:
- Target CPU=32 (so app runs as 32bit mode, instead of 64)
- Target Framework = .NET 3.5 SP1
The call has not always been this slow. I have been running with ODAC 11.2.0.1.2 since it's release. But, IIRC, the slowness just started several weeks ago.
Below is the test pgm:
Imports System.Configuration
Imports System.Data.Common
Module Module1
Sub Main()
CreateFactory("Oracle.DataAccess.Client")
CreateFactory("System.Data.SqlClient")
CreateFactory("IBM.Data.DB2")
End Sub
Sub CreateFactory(ByVal providerName As String)
Dim sw = New Stopwatch
sw.Start()
Dim factory = DbProviderFactories.GetFactory(providerName)
sw.Stop()
If factory Is Nothing Then
Throw New Exception(String.Format("DbProviderFactories.GetFactory({0}) failed", providerName))
End If
Console.WriteLine("DbProviderFactories.GetFactory({0}) call took {1} secs", providerName, sw.Elapsed.TotalSeconds)
End Sub
End ModuleThe output I get is:
DbProviderFactories.GetFactory(Oracle.DataAccess.Client) call took 130.1584958 secs
DbProviderFactories.GetFactory(System.Data.SqlClient) call took 0.0001462 secs
DbProviderFactories.GetFactory(IBM.Data.DB2) call took 0.1252213 secs
Please let me know if you need any more information. All help is appreciated.
JimAs I mentioned before, if I loaded the DBProviderFactory object, for the IBM.Data.DB2 provider, loading the Oracle.DataAccesss.Client provider ran quickly. The IBM.Data.DB2 provider always using a distributed transaction to communicate with the database. So, my guess is that the IBM DBProviderFactory was doing work to prepare for a distributed transaction. And this prep work allows the Oracle DBProviderFactory to run much faster.
So to test my theory, I created a TransactionScope object, before creating the Oracle DBProviderFactory. See new code below:
<pre>
Sub Main()
Using ts = New Transactions.TransactionScope()
CreateFactory("Oracle.DataAccess.Client")
End Using
End Sub
Sub CreateFactory(ByVal providerName As String)
Dim sw = New Stopwatch
sw.Start()
Dim factory = DbProviderFactories.GetFactory(providerName)
sw.Stop()
If factory Is Nothing Then
Throw New Exception(String.Format("DbProviderFactories.GetFactory({0}) failed", providerName))
End If
Console.WriteLine("DbProviderFactories.GetFactory({0}) call took {1} secs", providerName, sw.Elapsed.TotalSeconds)
End Sub
</pre>
And this was the result:
DbProviderFactories.GetFactory(Oracle.DataAccess.Client) call took 0.1925129 sec
a dramatic speedup.
Is this expected behavior? More importantly, is there a fix to make loading the Oracle DbProviderFactory faster without requiring the creation of a TransactionScope object?
Thanks,
Jim
Edited by: thompkin on Nov 18, 2010 10:55 AM -
Oracle.DataAccess.Client.OracleDataAdapter exists in both v2 and v4
Hi there,
I am developing ASP Net application with ODP.NET 11.2.0.2.1 and VS 2010. The target framework is .Net framework 3.5 and I've explicitly Oracle.DataAccess reference to v.2, with
<add assembly="Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
, but when it compiled, it throw error
The type 'Oracle.DataAccess.Client.OracleDataAdapter' exists in both
'c:\WINDOWS\assembly\GAC_32\Oracle.DataAccess\2.112.2.0__89b483f429c47342\oracle.dataaccess.dll'
and 'c:\WINDOWS\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess\v4.0_4.112.2.0__89b483f429c47342\oracle.dataaccess.dll'
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\esptweb\df172a69\e974c60e\App_Code.eoge0t0f.4.cs
How can I fixed it?
Thanks for the help.Did you try adding that reference using the Add Reference command in Visual Studio instead? I've never seen it behave like this before.
There are two versions of the assembly, but it shouldn't be trying to load the .net 4 version if you have a reference to the .net 2 version and you're in a 2 (or 3.5) app.
Maybe you are looking for
-
EJB 3.0 - Destinations not specified
Hi, I am trying to deploy a J2EE application supporting EJB 3.0 on SAP CE 7.1 . During the deployment using NWDS , i am getting the error as "Destinations not specified". However , i have already preformed below listed steps : --> I have specified t
-
Photoshop elements 6 will not open!
Purchased photoshop elements 6. My dad has that one and recommended it for what I want to do with photos. It was the only elements in our budget and since my dad uses it, I figured instant help should I need it. I tried installing it. It said it w
-
Extended Program check for internal table
TYPES:BEGIN OF TY_FINAL, VBELN TYPE VBAP-VBELN, VBELV TYPE VBAP-VBELV, POSNV TYPE VBAP-POSNV, WERKS TYPE VBAP-WERKS, ZZ_MODEL_NO TYPE VBAP-ZZ_MODEL_NO, VKORG TYPE VBAK-VKORG, TEXT(70) TYPE C,
-
Dear Experts, We are using Ecc 6.0 here we found some problem during PO and MIRO T Code In ME21N we face tax code is blank in some cases and po is saved we can take GR and MIRO successfully how is it possible i can't understand. During MIRO one can c
-
Elements 12 will not install on my computer
Elements 12 will not install on my computer. It says it was not acitvated at the place where it was purchased. Place where purchased would not take as a return because it shows it has already been activated.