cancel
Showing results for 
Search instead for 
Did you mean: 

Error 20599 with VB6/CR 8 OCX/SQL Server 2005

Former Member
0 Kudos

I'm converting a legacy app from SQL Server 2000 to SQL Server 2005. The app is written in VB6 and utilizes CR 8 OCX. When I invoke a report from VB I'm getting Error# 20599 Cannot open SQL server. I redefined the ODBC DSN specifying Windows Authentication, and the SQL Server instance supports mixed mode.

Searching for the error, I found an article that suggests I need p2sodbc8.zip, but I can't find a link to it in the Downloads area.

Would greatly appreciate any help at all - including a link to p2sodbc8.zip if that's the likely resolution.

Thanks in advance,

Pete

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Pete,

The OCX, and Crystal Reports 8 have been gone for a very long time. SQL Server 2005 came out well after the retirement of both CR8 and the OCX. If your VB6/OCX application was working with SQL Server 2000, and now it's not working with SQL Server 2005 then it's more likely that the database drivers aren't recognizing some change from SQL Server 2000 to SQL Server 2005.

I've never seen the p2sodbc8.zip file specifically but it's likely that this is just a packaged version of the p2sODBC dll for Crystal Reports 8. If you have p2sODBC.dll on your development machine then you probably have it already and it's just not working with SQL Server 2005.

Others may be able to reply to this thread with additional information about the p2sodbc8.zip file. Considering the age of the OCX you'll probably want to consider migrating to a newer version of Crystal Reports, and a newer development component.

Sincerely,

Dan Kelleher

Answers (1)

Answers (1)

Former Member
0 Kudos

Dan,

Thanks for your reply. First, it was SAP Note 1212538 that mentioned the .dll. Maybe it should be removed (or edited) given that it references a resource that is no longer available.

Second, I finally found the .dll via Google and tried it. My previous version was 8.0.0.84, and the new one is 8.0.0.85. It didn't solve the problem.

I'm using CR 10 and 11 for several other systems I've developed and currently support. This system was developed in 1999-2000 with little change since then, and upgrading to a current CR release will be an extremely difficult option to sell. My client is right in the middle of the wall street financial crisis, and is watching every penny. The legacy system I'm working on has over 150 reports built into it that are primarily fired from the app's main menu. Changing from OCX to RDC would be a big change in terms of time and expense.

I'm still holding out hope that someone might recognize this as a problem they encountered when doing a similar upgrade. Any help at all would be greatly appreciated.

Thanks,

Pete

0 Kudos

Hi Pete,

The OCX was basically a COM wrapper around crpe32.dll. It's possible you may be loading the wrong version of crpe32.dll. If they or you have more than one version on your DEV PC which is likely if you support all 3 versions, it may be the problem. Copy or move the crpe32 version 8.0 from the \windows\system32 folder to the same location your EXE is in. This way your app will load the correct version.

I've seen other issues like this when upgrading to 2005 and it is usually due to permissions on various tables. Our errors in version 8 were not that clear on the cause of the problem. It may be SQL Server is simply not allowing your app to connect or allowing access to the DB and tables. Turn on SQL Profiler and then run the app to see if the SQL is getting out of your app and to the DB server. If you see it in Profiler then it's likely permission issue, if you don't see it then unfortunately your only option is to stay on MS SQL 2000. Or upgrade CR.

We don't even have CR 8.0 available to install any more, 8.5 is as old as we can go back to.

Thank you

Don

Former Member
0 Kudos

Hi Peter,

Have you found the solution for this problem?

I am facing the similar issue as yours. We have a legacy VB6 application developed in "VB6 + Crystal32.OCX in Crystal Report 8.5 + MS SQL server 2000 + Mixed Mode + SQL login". It has been working fine since it was developed in 2002. However, recently the "Mixed Mode + SQL login" caused audit issues. We were asked to change it to "Windows Authentication Mode + Window login". However, once changed, all the crystal reports were not able to called up. Error 20599 appears.

I have tried and exhausted all the different methods to resolve this issue without success. And I believe we will be soon asked to upgrade SQL server 2000 to SQL server 2005. Appreciate if you could share if you really have solution.

Rgds,

Kelland

Former Member
0 Kudos

Kelland,

I never found a solution to the problem as described, so I upgraded to CR 10 and that solved the problem. The toughest part of upgrading was in VB - the several hundred reports were actually easy to upgrade simply by opening them in CR 10 and changing to a consistent data source.

Good luck,

Pete

0 Kudos

Hi Kelland and Peter,

You basically have the answer. The OCX simply could not deal with AD authentication or any other setting than MS SQL Authentication.

Thank you for letting Kelland know how to fix the problem, even though it requires upgrading.

Marking this post as assumed answered.

Thank you

Don

Former Member
0 Kudos

Pete & Don,

Appreciate your quick response. Anyway, no solution is already a good reply to my question so that I don't need to explore further if I can still keep the OCX and solve the problem at the same time.

Pete,

Agree with you that the toughest part is to change the source code in VB programs on the reports calling, it's just like you are rewriting the whole application. For my case, there are over 80 reports to convert. Appreciate if you could share your experiences in making things happen smoother and faster.

Don,

Correct me if I am wrong, my understanding is that the RDC in CR 8.5 could not deal with AD authentication neither. RDC comes with CR 8.5 is a lowever version which don't have connection properties. In that case, I need to purchase a higher version of CR that comes with the latest RDC. According to Ludek in another article, "CR XI Developer" is the latest available CR in the market shipped with the latest version of RDC. Furthermore, RDC has now been also deprecated as of Version CR 2008, so the most recommended way is to go for Visual Studio .NET and use the Crystal Reports Assemblies for .NET (Don, does it refer to Crystal Reports 2008?).

Just curious that I have number of VB applications in "VB6 + Crystal32.OCX in Crystal Report 8.5 + IBM DB2 Server + a fixed windows login", which I find them rather stable. They have been working fine eventhough we upgraded DB2 server from V7 to V8 and now from V8 to V9. Therefore, no migration is needed for these applications. Understand that any version higher than Crystal Report 8.5 does not come with Crystal32.OCX. In that case, I have to keep at least two versions of Crystal Report for my case. Namely,

1) Keep Cyrstal Report 8.5 Developer edition for applications in "VB6 + Crystal32.OCX in Crystal Report 8.5 + IBM DB2 Server + a fixed windows login".

2) For those applications in "VB6 + Crystal32.OCX in Crystal Report 8.5 + MS SQL server 2000 + Mixed Mode + SQL login", need to decide which directions to port them over :

a) "VB6 + RDC in CR XI + MS SQL server 2000/2005 + Windows Authentication Mode + AD login"

b) "VB.NET + Crystal Report 2008 (.NET framework) + MS SQL server 2000/2005 + Windows Authentication Mode + AD login"

Either ways is costly and time consuming. But basically, I need to understand the situation clearer before turning back to the management to ask for a decision.

Regards,

Kelland