Results 1 to 7 of 7

Thread: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    10

    CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

    Greeting All,
    I now update my database to SQL Server 2000 from 6.5. The VB app now gives me an error: "Error detected by database DLL." when I connect to SQL Server 2K. It works fine with SQL Server 6.5.
    One thing to note is that when I am in CR 8.5, open the report, connect to SQL Server 2K and it works fine. It only gives me error when I connect thru VB 6.0
    Please let me know if I miss any thing.

    Thank you for your time,

    Con Ki

  2. #2
    Lively Member
    Join Date
    Mar 2006
    Posts
    94

    Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

    Quote Originally Posted by Con Ki
    Greeting All,
    I now update my database to SQL Server 2000 from 6.5. The VB app now gives me an error: "Error detected by database DLL." when I connect to SQL Server 2K. It works fine with SQL Server 6.5.
    One thing to note is that when I am in CR 8.5, open the report, connect to SQL Server 2K and it works fine. It only gives me error when I connect thru VB 6.0
    Please let me know if I miss any thing.

    Thank you for your time,

    Con Ki
    The most obvious start would be to check the connection string if you use one or the DSN if you use that. Then make sure you have the latest MDAC (2.8 I believe) from Microsoft. Try looking at those and then see what happens.

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

    Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

    Post your vb code that connects/opens it in vb.
    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
    New Member
    Join Date
    Mar 2006
    Posts
    10

    Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

    Thank you all for your reply,

    I think it is some thing to do with the dbo permission.

    The source of data for the report is the stored procedure.

    From VB, if I connect using sa login, it works OK.

    Here is the connect string constructed from the login form:
    gConnectString = "Provider=sqloledb.1;Database=" & gDatabase & ";" & _
    "Server=" & gServer & ";uid=" & strUserId & _
    ";pwd=" & strPassword
    Note that gConnectString is a global variable.

    and now execute the report:
    'connect to SQL Server
    Dash1.Connect = gConnectString

    'Send report to preview window
    Dash1.Destination = 0

    'Set preview window state to "maximized"
    Dash1.WindowState = 2

    'Specify file name containing Crystal Report
    Dash1.ReportFileName = gReportDir & "dash1.rpt"
    'Dash1.ReportFileName = gReportDir & "test1.rpt"

    'Specify report parameter
    Dash1.StoredProcParam(0) = CIIC

    'Generate report
    Dash1.Action = 1

    I think I will have to some how specify dbo in the CR environment to recompile the report first, but still figure out.

    Please let me know if you have any idea.

    Thanks a lot.

    ConKi

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

    Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

    What is Dash1?

    You may need to use the .LogOnServer method too.
    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

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    10

    Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

    Dash1 is the name of the CrystalReport control.

    In CR environment, the source of this CR report is the stored procedure.

    I think I need to add dbo when specifying the source of the report so that it can work with other regular user, not only sa.

    Please let me know what you think.

    Thank you so much for your time,

    Con Ki

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

    Re: CR 8.5, VB 6.0 and SQL Server 2000. Help !!!!

    Try .SetLogOnInfo to log you on to your datasource also.
    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

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