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
    84

    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
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    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!
    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 i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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

    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!
    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 i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

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

    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
  •  



Click Here to Expand Forum to Full Width