Unable to retrieve the database schema information.
Reason: Could not load file or assembly 'Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c4724' or one of its dependencies. The system cannot find the file specified.
My project has a reference to Oracle.DataAccess.dll version 2.112.1.0 and it appears that this is the only DLL provided in ODP.NET.
Is my newer version the cause of the problem? Does Oracle.DataAccess.dll have a dependency that is not apparent? Any guidance would be appreciated.
16 Answers, 1 is accepted
You need to have ODP.NET installed on your machine, which you can download from here. The installer install's a policy file to your GAC which looks like this:
Policy.2.102.Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86
Hope this helps.
All the best,
Ralph
the Telerik team

Please describe your solution more.
I uninstall everything and reinstall ODP.NET 11.2.0.2.1 and have a policy you mentioned in GAC but I still have the same above error.
Thanks
Please ensure that you have the same version of the ODAC driver installed as your application is. If you are running a x86 program please install the x86 version of the Oracle ODAC drivers. The same goes for x64.
32 bit applications (x86 build setting) require the 32 bit ODAC ro be installed; 64 bit applications (i64 build setting) require the 64 bit ODAC version.
Hope that helps.
Ralph
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

I have not any problem regarding the installed ODAC driver in my development machine which is a Win7 32bit. I have this error only on production machine which runs on Windows Server 2008 R2 64bit.
I have installed the latest version of ODAC driver 32 bit on the server which I've downloaded from here.
Regarding my development machine OS (Win7 32bit) the build type of my application is x86 and since 32 bit of ODAC has been installed on the server, so my application should work fine on the server, but I'm getting the above mentioned error when I run my application from server.
What do you think Ralph?
I guess you are using this DLL within an IIS setup. Have you checked that your Application Pool supports 32bit applications. This can be set in the settings of the Application Pool.
Hope this helps.
Ralph
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

Thanks a lot

Thanks,
Shravan
I'm not sure, if I understood what your problem is, but if you face the same problem regarding the x86 drivers and you are in an IIS environment, then you can also enable support for 32Bit applications for your App pool.
You can use the Version 10.2 or higher of the ODP.net driver with Telerik OpenAccess ORM. Your downgrade should not be the reason for such an error.
I hope this information is useful for you. Do not hesitate to contact us if you need further assistance or you have other questions.
Ralph
the Telerik team
Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

I cleaned up my computer from all previous installations of Oracle and Telerik ORM. Then installed Oracle 10.2 Client Win32 runtime components (and even Instant Client and even Custom configuration), updated my tnsnames.ora, I could only create a new connection to my Oracle server using either Oracle Data Proider .NET or .NET Data Provider for Oracle in Telerik ORM Q3 2011, but in the next screen in Choose database items on New Domain Model Wizard, I still get the error Could not load file or assembly 'Oracle.DataAccess, Version=2.102.2.0....The system cannot find the file specified. I see that I have got Oracle.DataAccess.dll ver10.2.0.100 installed in GAC and also the Policy.9.2.Oracle.DataAccess.dll ver10.2.0.100. I could even use VS2010 Server Explorer to query my Oracle database. I even switched to x86 build. But, I just can't use Telerik ORM to work with Oracle 11g using 10g client. Is there anything that I am not aware of?
I appreciate your response.
Thanks,
Shravan.
Can you please check your machine.config file (mine is located at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config), if you have an entry similar to the following under the DbProviderFactories node?
<
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=4.112.2.40, Culture=neutral, PublicKeyToken=89b483f429c47342"
/>
You should have an entry depending on the client you have installed.
I really hope you get your application running with this entry.
Best wishes,
Ralph
the Telerik team
Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Thanks,
Shravan
Since you don't have to add any reference to the ODP.net assemblies in your project, you can simply deploy you application to the production environment without any additional efforts. The respective driver is resolved through the entries in the machine.config on the hosting system. We are assuming that the driver was installed on that system before, so the respective entries should be there.
Therefore it is possible to have a 11g client on your dev machine and a 10g client on your prod machine.
Ralph
the Telerik team
Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

static void Main(string[] args) {
OracleConnection conn = new OracleConnection("User Id=scott;Password=tiger;Data Source=machine_name/service_name");
conn.Open();
OracleCommand cmd = new OracleCommand("select sysdate from dual", conn);
DateTime dtm = (DateTime)cmd.ExecuteScalar();
Console.WriteLine("Database time is {0}", dtm.ToString("F"));
cmd.Dispose();
conn.Dispose();
}
this is code good work
my project openaccess orm using
this exception error
Could not load file or assembly Oracle.DataAccess
i'm odac install windows xp sp3 32bit comuuter run application is werry good work.
odac never install any computer run my project?
my requirement: never install oracle client and run my project
sorry my bad english :P
tnxCan you please ensure that your Oracle.DataAccess dll platform version matches your project's platform.
For an x86 platform, you need the x86 Oracle.DataAccess assemby. Same goes for x64. In case your project is configured to use Any CPU, then you need the platform of your OS.
I hope this helps.
Do come back in case you need further assistance.
Ralph
the Telerik team

my project platform X86 debug
my solution app.config file add this config add good work any other computer
<system.data>
<DbProviderFactories>
<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.112.3.0,
Culture=neutral,
PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
I was following the example link provided by you and based on this I have created two sample applications that use this approach. One via the way from the link, the other via OpenAccess.
For the attached packaged, I have removed all the Oracle dlls. To run this project, please add them as described in your link. This should be done in the OAXCopy and in the OracleXCopy test project. Also please adjust the connection strings and Oracle.DataAccess version informations appropriately.
With this I was able to connect to the oracle database via the direct connection approach and via OpenAccess.
Can you try if this also works in your environment?
Have you ensured in your application that you have the appropriate versions of the assemblies? What exceptions are you getting on your side?
I hope the sample application is useful for you.
Do come back in case you need further assistance.
Ralph
the Telerik team