Click to See Complete Forum and Search --> : 20599 Cannot open SQL server.


hellovishal101
June 3rd, 2010, 02:17 AM
Hai Mr. K. Babu
i m using vb6,oracle and crystal report
this is my code:
Cr1.ReportFileName = App.Path & "\REPORTS\" & reportname
Cr1.Destination = crptToWindow
Cr1.WindowState = crptMaximized
Cr1.Connect = "DSN=nbcfdc;UID=nbcfdc;PWD=cdac;DSQ=MBit"
Cr1.DiscardSavedData = True
Cr1.Action = 1

i have tried cr1.logoninfo too but still the same error :
"20599 Cannot open SQL server."


pls help me.
thax.

jggtz
June 3rd, 2010, 10:04 AM
Try :
(change constants)

Ms = "DSN=myorcl" & Chr(0) & "; " & _
"UID=myuser" & Chr(0) & "; " & _
"PWD=mypwd" & Chr(0) & "; " & _
"DSQ = " & mbit & Chr(0)

Report1.Conect Ms


JG

hellovishal101
June 15th, 2010, 06:32 AM
Still the same error boss.... 20599 Cannot open SQL server.
Pls help me....since last 20 days i am trying to solve this problem....

hellovishal101
June 15th, 2010, 07:33 AM
can u tell me ,what can be the reason behind this error. since my other report is working fine with the same code.