Error 20599 Cannot open SQL Server-VBForums
Results 1 to 5 of 5

Thread: Error 20599 Cannot open SQL Server

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    México, D.F.
    Posts
    83

    Error 20599 Cannot open SQL Server

    I am using Crystal Reports 8.5 and calling it from VB using the Crystal reports OCX.

    In Crystal Reports,If I check 'Save Data With Report',then it is working fine from VB.

    But the report is not refreshed with latest data.

    And If I Uncheck 'Save Data With Report' from Crystal reports and call it from VB then it is giving error like
    ----------------------
    Run-time error '20599'
    Cannot Open Sql Server
    -----------------------
    The report is working fine in Crystal Report Environment.

    Can you please help me out, thanks.

    Best Regards
    Angel Maldonado López.
    VB Programmer

  2. #2
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,074

    Re: Error 20599 Cannot open SQL Server

    You need CR to log on to the SQL server. Check out the SetLogOnInfo method.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  3. #3
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,074

    Re: Error 20599 Cannot open SQL Server

    One more thing, the reason that it appears to work when you have 'Save Data With Report'
    checked is because its not trying to get the data from the db. The data is "saved with
    the report" much like a snapshot.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    México, D.F.
    Posts
    83

    Re: Error 20599 Cannot open SQL Server

    Thanks RobDog, I was having problems with the log on server and the correct dll, I solved the problem and It works now.
    Thanks again and regards.
    Angel Maldonado López.
    VB Programmer

  5. #5
    Addicted Member
    Join Date
    Feb 2007
    Posts
    187

    Re: Error 20599 Cannot open SQL Server

    Hi, AM Lopez...

    Do you mind share out what are the correct dll?

    Thanks.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.