cancel
Showing results for 
Search instead for 
Did you mean: 

Login failure to Oracle Database - CR 2013 and .NET

Former Member
0 Kudos

Good morning,

I have seen similar questions before, but I am really stumped, so any help will be appreciated.

I have a report that does against an Oracle database.  When I run the report manually (in CR 2013), it asks for my credentials, and runs perfectly.  However, when I run using dotnet 2015, I get an exception (Database Login Failed) when executing ExportToDisk().

I can pause the program before executing ExportToDisk(), and have verified that the credentials are populated and correct.

This worked before on a different PC (using an older version of Visual Studio), so I suspect the problem is with the ODBC driver, or the Oracle Home, but testing the ODBC connection manually shows that ODBC works too.

I am confused about why it works when running manually, but not through Dotnet.

Thanks for any help.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Moved to .NET SDK forum.

Need to know what version of CR SDK you are using?

Currently the only version that supports VS 2015 is CR for VS SP 15 from this link:

And who's Oracle ODBC driver are you using? Oracle's or Microsoft's? MS Driver only supports Oracle 7 and below.

Don

DellSC
Active Contributor
0 Kudos

To add to this, generally when connecting to Oracle, the "Native Client" is MUCH more stable and provides more features than trying to connect via ODBC.  You might try changing the report to use the Oracle Native Client.

When you do that, in your code you will not set the "Server" in the logon properties, but you will set the "Database" to the database alias from the TNSNames.ora file.

-Dell

Former Member
0 Kudos

Thanks for the info, Don.

I'm using Crystal Reports 2013, SP 1, version 14.1.1.1036, CR Developer, Full Product.

While I said that I was running VS 2015, I get the same error in VS 2013.  The program was actually developed in either 2013 or 2010.

I'm using the Oracle ODBC driver (Oracle in Roaclient11g_home1).  This is a 32 bit driver, but the OS is 64 bit.  I'm thinking that may be the problem but, as I said, opening and running the report directly in CR works fine.

DellSC
Active Contributor
0 Kudos

If you're using the 32-bit client, you want to make sure that your application is compiled to target the "X86" platform, which is 32-bit.  If you target "Any CPU", it will automatically switch between either 32-bit or 64-bit depending on the operating system.  The other option would be to install the 64-bit Oracle client and create a 64-bit ODBC connection with the same name as the 32-bit connection.

-Dell

Former Member
0 Kudos

Thank you, Dell.  This is good info.  I'm going to try to use the native client.  I'll update you on the results.

0 Kudos

OK but CR 2013 does not install any SDK's. So where did you get the SDK package from?

If you are using CR for VS on the same PC as CR 2013 then you will have a problem. There are 11 dll's version 14.0 which will not work when CR 2013 version 14.1 is installed on the same PC.

So if you are using CR for VS uninstall Crystal Reports 2013 and repair CR for VS. Install CR on a different PC.

I've asked DEV to look into this and reversion those 11 dll's to 13 so there are no issues with side by side installs.

Don

Former Member
0 Kudos

Thank you, Dell and Don.  The issue was resolved by simply installing the 64-bit Oracle Client.  It seems obvious after the fact, but this problem was really taxing my brain......

Don, to answer your question, the report was developed using the full version of CR 2013.  The C# program then referenced the .rpt file.  It uses 3 dlls - CrystalDecisions.CrystalReports.Engine, CrystalDecisions.ReportSource and CrystalDecisions.Shared.  I don't remember if those dlls were installed with the product, or given to me by a member if the SAP support group.

DellSC
Active Contributor
0 Kudos

They would not have been installed with the product - Crystal no longer comes with the SDK as part of the product install.  Instead, you have to download the "Install Executable" from here to get the integration into Visual Studio.  The other downloads on that page are the various forms of runtime installs that you can use when you deploy your application.

Please make sure that the version of the assemblies that you're using are 13.x.  If they're not, you'll need to uninstall the older version of the SDK, download the correct SDK from the above site and install it.  The new SDK does not "play well" when installed side-by-side with the older version.

-Dell

Answers (0)