Page 3 of 3

Re: Key 'DatabaseOracleODP' is not found!

Posted: Sat Feb 09, 2013 4:24 pm
by gunde99
• Product name and its version;
Stimulsoft Report.NET version 2012.3
Visual Studio 2010 (C#)

• Detailed description of the problem and how to reproduce it;
Extract the zip-file: C:\Program Files (x86)\Stimulsoft Reports.Net\Adapters\OracleODPDatabase.zip
Open in VS2010 and convert the project
Add reference to all Stimulsoft .dll's
Add reference to Oracle.DataAccess.dll (v. 4.112.3.0)
Build the .dll for Framework 4.0
Copy both Oracle.DataAccess.dll and Stimulsoft.Report.OracleODP.dll to C:\Program Files (x86)\Stimulsoft Reports.Net\Bin\
Run C:\Program Files (x86)\Stimulsoft Reports.Net\Bin\Designer.exe
Add connection, Oracle ODP, press Build-button and get the error:

System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. Ett försök att läsa in ett program med ogiltigt format gjordes.
File name: 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342'


• Your operational system (98, ME, 2000, XP, Vista or 7), its version and localization, installed service-packs;
Windows 7 Professional, x64, Service Pack 1

• Version the of Microsoft .Net Framework package installed and its localization;
All frameworks up to v4.0.30319 installed

• Version of Oracle ODP.NET provider
11.2.0.3

• Additional information that can help us to solve your problem.
I've attached the .dll files I'm using

Thanks!

Re: Key 'DatabaseOracleODP' is not found!

Posted: Tue Feb 12, 2013 5:48 am
by Alex K.
Hello,

Please clarify which version of Oracle do you use?
Under x64 you need use x64 Oracle client.

Thank you.

Re: Key 'DatabaseOracleODP' is not found!

Posted: Wed Feb 20, 2013 2:41 pm
by gunde99
OK, it worked with a 64 client but now I have trouble using the mrt-file in my WinForms C#-project.

I created a new report-file and connected it with ODP to an Oracle table. Preview went fine but I tried to load the file from my application and it gave me this error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I've attached both the report.mrt and the scripts to create the table and fill it with some data.

Re: Key 'DatabaseOracleODP' is not found!

Posted: Thu Feb 21, 2013 6:35 am
by Alex K.
Hello,

Can you please describe your issue in more details.
Can you please show us your code for load and show report in your application.
Also please check that the OracleODPDatabase adapter added to reference of your project and in service:

Code: Select all

StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiOracleODPAdapterService());
StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiOracleODPDatabase());
Thank you.

Re: Key 'DatabaseOracleODP' is not found!

Posted: Mon Feb 25, 2013 9:47 am
by gunde99
I've attached the project and it is using the report attached in previous post. I've managed to get it work for 64-bit but not with a 32-bit provider.

The problem is that I'm developing on a 64-bit Windows 7 but I wan't to be able to deploy the software in various environments (both 64 and 32-bit). How can this be done?

Re: Key 'DatabaseOracleODP' is not found!

Posted: Mon Feb 25, 2013 11:59 am
by Alex K.
Hello,

Also please send your .mrt file for analysis.

Thank you.

Re: Key 'DatabaseOracleODP' is not found!

Posted: Mon Feb 25, 2013 5:58 pm
by gunde99
It's the same mrt file as before. I've created a mrt-file with a 64-bit ODP-provider but since I load it into a 32-bit application I thought it could work. Do I have to create two different files? How can I create a mrt-file that works with a 32-bit ODP-provider on a 64-bit Windows.

Re: Key 'DatabaseOracleODP' is not found!

Posted: Wed Feb 27, 2013 12:09 pm
by Alex K.
Hello,

According to the idea the x64 client version is required if you are using the application compiled with a compiler directive "x64". Try to compile your application with directive "x32" or "any cpu".
Also you are using in your code the following line:

Code: Select all

((StiSqlDatabase)report.Dictionary.Databases[0]).ConnectionString = "User Id=NOVA;Password=NOVA;Data Source=XE;Persist Security Info=True";
This is not true. In this case, you must use the following code to change the connection string:

Code: Select all

((StiOracleODPDatabase)report.Dictionary.Databases[0]).ConnectionString = "User Id=NOVA;Password=NOVA;Data Source=XE;Persist Security Info=True";
Thank you.

Re: Key 'DatabaseOracleODP' is not found!

Posted: Mon Mar 11, 2013 8:24 am
by gunde99
Sorry. It was my stupid mistake. I had the x86 configuration targetting the x64-platform. It's all working perfectly now. Thanks!

Re: Key 'DatabaseOracleODP' is not found!

Posted: Mon Mar 11, 2013 8:46 am
by Alex K.
Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.