Results 1 to 8 of 8

Thread: Crystal LogonServer

  1. #1

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Unhappy Crystal LogonServer

    Hi there

    I'm using Crystal Report 9.2 to access to MS Access 2003
    on my workgroup

    the DB path is \\server1\db1.mdb and password of DB is 2005

    How to use Report.Database.logonserver(....) ?
    Does Any one has ever try Database.logonserver ?

    Thanks for advance

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

    Re: Crystal LogonServer

    In the CR help files it will tell you which dll driver to use for Access and its syntax. This is an example of Access' DB logon info.
    VB Code:
    1. oReport.Application.LogOnServer "P2SODBC.DLL", sServer, sDatabase, sUserName, sUserPwd
    2. oReport.Database.Tables(1).SetLogOnInfo sServer, sDatabase, sUserName, sUserPwd
    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

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Crystal LogonServer

    oReport.Application.LogOnServer "P2SODBC.DLL", "\\server1", "db1.mdb", "administrator", "2005"
    oReport.Database.Tables(1).SetLogOnInfo "\\server1", "db1.mdb", "administrator", "2005"


    Is this correct ?
    if that report has too many table, do i need to do this every table?

    Thanks

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

    Re: Crystal LogonServer

    Without the double backslashes.
    VB Code:
    1. oReport.Application.LogOnServer "P2SODBC.DLL", "server1", "db1.mdb", "administrator", "2005"
    2. oReport.Database.Tables(1).SetLogOnInfo "server1", "db1.mdb", "administrator", "2005"
    You can iterate through the tables and setlogoninfo for each. I cant remember the exact syntax but its on the Forums. Try a quick search.
    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

  5. #5

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Crystal LogonServer

    Thanks a lot man

  6. #6
    Junior Member
    Join Date
    Mar 2007
    Posts
    16

    Re: Crystal LogonServer

    Hi Rob, What about I have the access with password in the local XP machine? in the server column what should I use?

    Im still using Crystal 4.5 so it should be in:
    myReport.LogOnServer "P2SODBC.DLL", "localhost", App.Path & "\database\myData.mdb", "admin", "1234"

    This return me Unable to Logon server! Please help!

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

    Re: Crystal LogonServer

    Instead of localhost use the computer name. I'm not sure if its compatible with 4.5 but give the code a try.
    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

  8. #8
    Junior Member
    Join Date
    Mar 2007
    Posts
    16

    Re: Crystal LogonServer

    Hi Rob, thanks for your advice, any how I has found another to logon the server:

    Report.LogonInfo(0) = "dsn=myDSN;uid=admin;pwd=1234;dsq="

    Eventhough is working but I much prefer not to use DSN if possible like to use coding, because we have to create the DSN on the other PC with the exact name in our code, if DSN currupted then will be a problem.

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