CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2010
    Location
    Delhi
    Posts
    3

    Question 20599 Cannot open SQL server.

    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.

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: 20599 Cannot open SQL server.

    Try :
    (change constants)
    Code:
    Ms = "DSN=myorcl" & Chr(0) & "; " & _
         "UID=myuser" & Chr(0) & "; " & _
         "PWD=mypwd" & Chr(0) & "; " & _
         "DSQ = " & mbit & Chr(0)
    
    Report1.Conect Ms
    JG
    Last edited by jggtz; June 3rd, 2010 at 11:04 AM.

  3. #3
    Join Date
    May 2010
    Location
    Delhi
    Posts
    3

    Re: 20599 Cannot open SQL server.

    Still the same error boss.... 20599 Cannot open SQL server.
    Pls help me....since last 20 days i am trying to solve this problem....

  4. #4
    Join Date
    May 2010
    Location
    Delhi
    Posts
    3

    Re: 20599 Cannot open SQL server.

    can u tell me ,what can be the reason behind this error. since my other report is working fine with the same code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured