Problem with Crystal Reports, vb6 and sql 2005
-
19. března 2012 19:30I have a program that is written and complied in vb6 and uses crystal reports version 8.0.1.0. I am connecting to a SQL 2005 database and using the Crystal Report Viewer for the reports. Everything is written in an XP environment and has been running in XP for years with no problems.
I recently received a request to run on Windows 7 32 bit. I modified the install and things have gone well with VB6 and SQL 2005, but Crystal Reports is giving the following error
Run-time error ‘-2147192184 (80047288)’
Server has not yet been opened.
I know the database connection is open and fine, because VB6 is able to fill drop down boxes with information from the database.
My development computer is setup with 2 hard drives. One boots to XP and the other boots to windows 7 64 bit. When I run the program that has been installed on the Windows 7 drive from the XP drive everything works fine. (example: from the c: drive of XP move to D: drive that is Windows 7 and run the program. )
If the same program is connected to an Access database in the Windows 7 environment, there is no problem with the reports.
I hope there is an easy fix for this.
For another problem.
On windows 7 64 bit I am unable to install SQL 2005 32 bit. It errors out with not being able to connect to the database during the install.
If I cannot install the 32 bit SQL 2005 on Windows 2005 how can I setup a connection string that would see the SQL server I have on the XP drive from the Windows 7 drive. Is this possible.
I am a developer and know I am going to be facing these questions a lot in the future. My clients are slow to change operating systems and definitely to change program platforms.
Thanks ahead for your answers to my problems
Suzanne Lechner
1 Person had
this question
Všechny reakce
-
20. března 2012 19:23Moderátor
Hello,
Please, could you have a look at ?
and especially http://social.msdn.microsoft.com/Forums/en/sqldataaccess/thread/8274eb9b-de67-408f-9ba0-da5bea7c70a1
If i have understood, you are using a version 8.0 which is an old,old one as the more current version is the 10 or even 11 ( idem for VB6 it has been released in 1997 or 1998 as i used VB6 Entreprise provided with SQL Server 6.5 ).
I am not sure that Windows 7 supports SQL Server 2005 , especially if your operating system is a 64-bits. I will try to find more informations about a possible incompatibility.
Have a nice day
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
-
21. března 2012 16:33
Hi
Thanks for the information. I have asked the client about authentication to the database and that may solve the problem.
It seems that most people are trying do develop the reports in windows 7. I am still developing in XP but need to run on Windows 7 32 bit.
I am developing on a single machine with 2 drives. One boots up in XP and the other in Windows 7 Pro 64 bit. I think I need to install SQL 2005 on the Windows 7 machine for testing of the installed program.
I have developed and created the install on XP and installed it on Windows 7. Without the database I cannot fully test the install. According to my client the VB6 part is working fine with his SQL but the crystal reports will not run. I am using the Report Viewer for Crystal viewing and not individual rpt files.
I sent the above yesterday in an email. I am new at this and didn't realize I needed to answer here.
I think I have narrowed the problem down a little more.
I am using unbound fields to produce the Crystal report
Steps and some code:
1. Create a SQL statement to query the database based on the search criteria the user has entered
2. cmd.commandtext = the query
cmd has been dimmed as ADODB.Command
3. cmd.ActiveConnection = cnn
cnn is a Global variable and defined as ADODB.connection
cnn has the connection string used throughout the program and is kept in an ini file.
4. Set the report to the .dsr crystal report format that has been developed
5. MyReport.Database.AddADOCommand cnn,cmd
This is one of the places I think the problem may be
6. Fill the unbound fields with the data found in the sql query
example: myreport.CurBal.SetUnboundFieldSource "{ado.curr_bal}"
7. Call the report viewer RptViewer.show 1
I hope this is more helpful and that you have an answer for me. This works fine in Windows 7 against an Access database. The connection is just a little different.
Thanks again
Suzanne
-
6. srpna 2012 20:11
HI Suzanne
I having the same issue, i am even having tough time finding the version of Crytal report files, i have checked the version of the crviewer.dll its 10 .2 also checked in the GAC where it says 10.2 , but i do not know which version the .rpt files are in ..
How did you managed to get the version of the files..?