p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Pro VB Databases (http://p2p.wrox.com/forumdisplay.php?f=81)
-   -   Error 20599 Cannot open SQL Server (http://p2p.wrox.com/showthread.php?t=11987)

Niaz April 19th, 2004 07:15 AM

Error 20599 Cannot open SQL Server
 
I have been trying to browse a Oracle based Crystal Report with following VB code:

 CrystalReport1.DiscardSavedData = 1
 CrystalReport1.ReportFileName = "C:\Report1.rpt"
 CrystalReport1.Action = 1

I am using crystal report control. The database of the report is ODBC datasource connecting to oracle. Without DiscardSavedData this works, but displays old data. With DiscardSavedData, I get the error message - Error 20599 Cannot open SQL Server. Can anyone help me to solve this problem.

sal April 19th, 2004 09:03 PM

What is the recordsource for the report? I am taking a stab at it, but i think that the report is probably set to a SQL Server database connection and not Oracle.

Probably did not help much.



Sal

hriquelme May 3rd, 2004 07:39 PM

This problem occurs when you try to open a crystal report and you have not connected properly.

Use this line of code.

CrystalReport1.Connect = "Data Source=Localhost;UID=username;PWD=password;DSQ=Dat aBaseName;"

If you are using DSN repleace like this

CrystalReport1.Connect = "DSN=Name_Of_Your_Connection;UID=username;PWD=pass word;DSQ=DataBaseName;"

*******************************SPANISH************ *****************
Este error sucede porque en Crystal Reports no podemos grabar el usuario y password en el reporte ni siquiera en el control, así que necesitamos usar la siguiente linea de código

CrystalReport1.Connect = "Data Source=Localhost;UID=username;PWD=password;DSQ=Dat aBaseName;"

Si usas DSN

CrystalReport1.Connect = "DSN=Name_Of_Your_Connection;UID=username;PWD=pass word;DSQ=DataBaseName;"

SALU2
See you



Niaz May 4th, 2004 12:03 AM

Thanks Salu2,

I was able to solve the problem by supplying the Password (PWD) in the LogonInfo(n) properties of the Report. Other Connect parameters (database name, user id, etc.) are in the report file.

Regards

Niaz

syncin December 27th, 2004 12:35 PM

dear niaz
im stuck with the same problem, i have even set the connect property but still getting the error, "cannot open sql server", can u please give me the exact piece of code you used that solved your problem.
thanks in advance
syncin

Kamal

emidio_nasc January 9th, 2005 06:04 PM

Hy!

I've the same problem, but with some diference.

My stuff:
3 W2K Servers with MS SQL Server
25 Win98se with Setup VB6 and my program
1 XP (SP1) with Setup VB6 and my program

I've this message only in the XP machine, after more less 2 hours working!!!!

Then, I need to reboot the machine and this message will show again after more less 2 hours and again and again... [V]

Only the Crystal Reports stop working, but other functions stay working normally. [}:)]

And more! I've installed the Crystal Reports Design 8.0 in this XP machine and after that 2 hours, the Crystal too can´t connect to the server!!!

Do anybody know what is happening??? :D

Emidio Nascimento


All times are GMT -4. The time now is 09:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.