cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to open the connection. Error in the Designer when copying ...

Former Member
0 Kudos

I have two different systems I am developing an application on.

I copy the entire directory from one system to the other. Both systems have the same environment:

Visual Studio 2010

Crystal Reports for Visual Studio 2010 (the production release, or I think it is the vesion is 13.0.2.0 is the version on the assemblies)

SQL 2008 R2

Today, I started adding Crystal reports to this VS solution. I have a reportdriver class that exports all the reports to an HTTP Stream, but we can sit that aside for now. The problem I am having is strictly with the integrated designer.

I have a bunch of existing reports written for an old Sybase databse. I have ported them to SQL and the table structure matches. I simply add the report to my project, point it to the new datasource (using "Set Datasource Location" - OLE ADO SQL) and then preview the report to be sure it runs.

I am just using "localhost" as my server name for the OLE connection so I...in theory... don't have to change the data source to view it on the other system. Both systems have SQL 2008 R2 installed locally. For my login credentials, I use SQL Security and use the same database login/password on both development machines andthe production server.

Today, I copied my entire project to the other PC (as I do almost every day).. When I open any of the reports (in VS) and try to preview them I get:

Failed to open the connection.

Details: ADO Error Code: 0x80004005

Source: Microsoft OLE DB Provide for SQL Server

Description: [DBNETLIB][ConnectionOpen (Connect().]SQL Server does not exist or access denied.

SQL State: 08001

Native Error: 17 [Database Vendor Code: 17]

I can only guess that I am using two different OLE ADO drivers on the two systems or there is something embedded in the rport or somewhere in my solution that "knows" I am not really on the same system that I initially set them up on and previewd them with.

Am I on the right track? Any idea how I can fix this? Obviously, I don't want to have to setup the datasource for every report in my application (if I do that, the report works) when I copy it from the development to the production server.

I am in a real bind here and under a fast aproaching deadline. Any help is much appreciated!!!

Shayne

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Try installing the Client Tools for SQL Server on your second PC.

Thank you

Don

Former Member
0 Kudos

the both have the client toold, becuase both have the SSMS (Management Studio).

0 Kudos

Don't use localhost as your server name. It's a reserved name and should not be used in code.

Try this also [Kbase |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333433363339%7D.do] SAP Note 1553469 - How to enable Database logging in Crystal Reports for Visual Studio 2010

Edited by: Don Williams on Jan 30, 2011 6:02 AM

0 Kudos

Also,

Don't use localhost as your database name. That name is actually a reserved name and should not be used when connecting other than in the Client connection configuration for testing only. At runtime CR uses that name so you can not.

Thank you

Don

Former Member
0 Kudos

Everything is working fine on the production server and both developer workstations (after reloading CR for VS on one of the developer workstations).... Therefore, I dont see any reason to switch from localhost?? It seems to resolve and work just fine??

Answers (1)

Answers (1)

0 Kudos

Just warning you. CR and BOE uses LocalHost extensively in our back end code and I have seen other cases where this did cause a problem. If it works then great, if it stops working then try changing this first.