Data Connectivity
 Crystal Reports Forum : Crystal Reports .NET 2003 : Data Connectivity
Message Icon Topic: Error Code 4060 Post Reply Post New Topic
Author Message
joshuakk
Newbie
Newbie


Joined: 06 Aug 2007
Online Status: Offline
Posts: 12
Quote joshuakk Replybullet Topic: Error Code 4060
    Posted: 07 Aug 2007 at 1:05am
Hi guys,
 
I'm new to crystals XI and encountering a wield error here.
 
It worked before, but then I try to using the Crystal Report Designer and then paste in onto the .NET application, I get the following error:
 
Failed to open the connection. Details: [Database Vendor Code: 4060 ] Failed to open the connection. D:\Temp\temp_92b18c35-7d33-4e08-bbeb-2669d5f90fd0 {6DFC91BE-A0CA-43C4-9614-4E0112D37CA2}.rpt Details: [Database Vendor Code: 4060 ]
 
It works in the .NET designer and I confirmed the database connection is correct, I use
 

public static ConnectionInfo GetConnectionInfo()

{

ConnectionInfo connectionInfo = new ConnectionInfo();

connectionInfo.ServerName = "ccsu-gmt-057";

connectionInfo.DatabaseName = "AHCP_tst";

connectionInfo.UserID = "dd";

connectionInfo.Password = "ss

return connectionInfo;

}

public static void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)

{

Tables tables = reportDocument.Database.Tables;

foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)

{

TableLogOnInfo tableLogonInfo = table.LogOnInfo;

tableLogonInfo.ConnectionInfo = connectionInfo;

table.ApplyLogOnInfo(tableLogonInfo);

}

}

I wonder if it is because I copy and paste from the crystal designer? However, now nothing works for me so I'm a bit frustrated (It worked before I do the copy and paste changes. Can anybody tell me what's wrong with it? I'm currently using SQL Server 2000.



Edited by joshuakk - 07 Aug 2007 at 1:12am
IP IP Logged
joshuakk
Newbie
Newbie


Joined: 06 Aug 2007
Online Status: Offline
Posts: 12
Quote joshuakk Replybullet Posted: 19 Aug 2007 at 7:43pm
Just for your information, I resolved it by rebuilding the database !
 
Have no idea why this happens... after wasting a week's time.
 
Reporting Service won't have this kind of problems.
 
Josh
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Aug 2007 at 10:23pm
Glad to hear that you got the problem resolved. But I'm not sure where you heard that Reporting Services was perfect. After all, MS is rewriting it because so many people are complaining about it:

http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=623

Edited by BrianBischof - 20 Aug 2007 at 10:25pm
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
wheeter
Newbie
Newbie


Joined: 03 Mar 2010
Location: United States
Online Status: Offline
Posts: 1
Quote wheeter Replybullet Posted: 03 Mar 2010 at 2:25pm
I struggled with this problem for many hours.  It ended up being a problem related to the server being 64-bit.

There are two versions of the ODBC on a 64-bit server.  The standard one that opens from Administrative Tools runs from C:\Windows\system32\odbcad32.exe.  The other one, which I was not aware of until now, must be executed directly from C:\Windows\SysWOW64\odbcad32.exe, and in my case needed to have the associated ODBC System DSN modified from there, as well.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.