cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling 64 bit app, DSN not being found

Former Member
0 Kudos

Good day,

I am compiling a 64 bit VS2010 C# application. Platform is x64.

I using XPx64 SP2. I have installed CRforVS_13_0.exe and CRRuntime_64bit_13_0.msi.

I have created both a 64bit system ODBC DSN and a 32bit system ODBC DSN.

If I compile for 32 bit, all is fine and it uses the 32bit DSN.

If I compile for 64 bit, I get a Database login prompt (where the server name is my DSN, Database is blank and uneditable and I can enter my loginid and password).

using System;
using CrystalDecisions.CrystalReports.Engine;
using System.IO;
using System.Windows.Forms;
using vertica;

...

private void button1_Click(object sender, EventArgs e)
        {
            _rpt = new ReportDocument();
            _rpt.Load(eReportFilename.Text);

            rptviewer.ReportSource = _rpt;
        }

The reason that I am using 64 bit is because some of our reports are very large and think that we are going beyond 32 bit limits.

Thoughts?

-Markus

Accepted Solutions (1)

Accepted Solutions (1)

Adam_Stone
Active Contributor
0 Kudos

There is a 32 bit DSN manager, and a 64 bit DSN manager, you need to make sure you are creating it in the one that you intend to use.

Former Member
0 Kudos

Thanks Adam,

I am creating both. I can see my 64 bit ODBC DSN in the registry and that is the default manager as well.

-Markus

Adam_Stone
Active Contributor
0 Kudos

Do you have the 64 bit database driver installed?

Former Member
0 Kudos

Hey Adam,

I do, I even put the driver in the app dir in hopes to make sure it used it.

I would think that this is occurring before it is reaching the database since it wouldn't know (???) what database/database type to access without a DSN. But that is me guessing.

(I applaud the fast responses I am getting, many thanks)

-Markus

Edited by: MarkusR13 on Mar 4, 2011 12:41 AM

ido_millet
Active Contributor
0 Kudos

On a 64-bit machine the ODBC DSN administration for your 32-bit ODBC connections is at:

C:\WINDOWS\SysWOW64\odbcad32.exe

DON'T use Control Panel, Administrative Tools, ODBC... because Crystal doesn't use and can't recognize 64-bit DSNs.

0 Kudos

Hi Markus,

What database are you using? And who's ODBC driver?

Is the path to the client in your PATH statement?

And Ido is not correct, CR for VS 2010 running in 64 bit platform requires the DSN to be created in the Control Panel where the 64 bit DSN is created.

Are you building your 64 bit app by setting it for 64 bit only and not AnyCPU?

Thank you

Don

Former Member
0 Kudos

Hey Don,

I am using Vertica database and their 64 bit driver. Yes 64 bit only.

The path to my client is NOT in my path. Let me try that...

Thanks much,

-Markus

0 Kudos

See this kbase article also on: 1553469 - How to enable Database logging in Crystal Reports for Visual Studio 2010

Should give you more info on what may be generating the error and should look something like this ( ignore the first error):


TIMESTAMP	THREAD_ID	FILENAME	LINE_NUMBER	LOGGED_DATA	LEVEL
2011-3-3 11:13:1.733	1812	..cserrinf.cpp	523	Error 14722 (..csdll.cpp, 117): : C:Program FilesBusiness ObjectsBusinessObjects Enterprise 12.0win32_x86crw32_res_xx.dll	1
2011-3-3 11:13:19.623	1812	.QESession.cpp	444	Set Product View Locale: 1033	20
2011-3-3 11:13:19.623	1812	.QESession.cpp	478	Set Preferred View Locale: 1033	20
2011-3-3 11:13:19.623	1812	.QESession.cpp	500	Set Process Locale: 1033	20
2011-3-3 11:13:19.654	1812	.qecommon.cpp	117	This property is currently in a read-only state and cannot be modified. File Name: ".QEProperty.cpp". Line: 217	1
2011-3-3 11:13:21.186	1812	.qecommon.cpp	117	 File Name: ".QEQueryInfo.cpp". Line: 826	1
2011-3-3 11:13:21.201	1812	.qecommon.cpp	117	 File Name: ".QEQueryInfo.cpp". Line: 854	1
2011-3-3 11:13:21.201	1812	.qecommon.cpp	117	 File Name: ".QEQueryInfo.cpp". Line: 5385	1
2011-3-3 11:13:21.217	1812	..cserrinf.cpp	523	Error 31809 (....srcdataqueryenghelp.cpp, 551): Unknown Database Connector Error: 	1
2011-3-3 11:13:21.217	1812	..cserrinf.cpp	523	Error 31813 (....srcdatadatabasetable.cpp, 508): The parameter '@AnalysisPeriodID' could not be found.: @AnalysisPeriodID	1

Thank you

Don

Former Member
0 Kudos

Hey,

I want to follow the instructions in article 1553469.

(this is in regards to the path work around)

But I don't understand why we make a .reg file, then create the registry entries, then import the reg file (which doesn't appear to work). Isn't the .reg file redundant for what we just did manually)steps 1,2,3).

Disregarding the inability to import the .reg file but following steps 1,2,3 (and the environmental variables) I don't get anything in the c;\logging dir while running the app in x64.

I put the crlogger.dll in c:\logging\

-Markus

0 Kudos

Hi Markus,

Sorry I keep forgetting we don't have a 64 bit crlogger, it won't be out until SP 1 I believe.

Try enabling Tracing in ODBC Administrator and see what that shows...

Sorry again

Don

Former Member
0 Kudos

I do have "MyLog" and "CommLog" logging enabled for my x64 ODBC DSN but I am not getting any log while in x64 compile (I do for the x32 DSN when compiled for x32). That is why I don't think Crystal or .Net isn't finding my x64 ODBC DSN.

No problem on the logger. I had read that it didn't support x64 but thought I would try anyway.

I am going to write a raw report in x64 mode and see if I can find my x64 ODBC DSN.

-Markus

Former Member
0 Kudos

Hmmm,

When I my platform is x64 and I try to create a new report I cannot see my x64 DSN.

When I say "Create New Connection" in the database Expert Dialog (or Data Dialog when creating a new report) and select ODBC(RDO) I see my x32 DSN but not my x64 DSN.

-Markus

Adam_Stone
Active Contributor
0 Kudos

The reason for that is the designer is 32 bit, so it will only see the 32 bit DSN's.

Former Member
0 Kudos

Hey Adam,

I don't "need" the designer. It was mainly to try to find the help solve the issue.

My reports are already created, obviously, using 32bit dsn of the same name . At runtime it cannot find my x64 DSN of the same name.

Thoughts?

-Markus

0 Kudos

Hi Markus,

Just to be clear, when you are using the VS .NET IDE running your report it will be running in 32 mode. If you set your App to compile in x64 mode then you will see both the 32 and 64 bit dll's being loaded.

Compile your app in 64 mode to the release folder. Browse to the Release folder and double click your Executable. Now your app is running in 64 bit mode.

If the app still does not work using the 64 bit DSN then with your app open run [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip], Do you see your 64 bit database driver being loaded?

In ODBC Adm try enabling tracing again, then use your 64 bit DSN and you should have a Test Connection button. Does that generate any info in the log file?

I had a look on their web site but I don't find any info on 64 bit ODBC driver. Do you have a link I can look at for their driver spec's?

Thanks again.

Don

Former Member
0 Kudos

ok, I found that if I open the report and "set data source location" to reset the data source the report runs...

Interesting that in x32 it resolves itself but in x64 it does not (annoying since I have 150+ reports).

I will play around with changing this programmatically.

Thanks much for the forums very quick responses!!!!!

-Markus

Answers (0)