CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008
    Posts
    74

    problem using crystal report 6.0

    hi,
    i creat a report to load values from a sql server
    i using the crystal report 6.0 in my computer i can connect using the vb6
    to the local database named "new" without problem.
    but if i try connect to other sql server i see this error:
    Unable to load report err. number: 20525
    i have installed vb6 in other computer and try to load the report
    and connect to the database server "new" and i receive the same error
    so i think there is a problem when i try to connect to a remote server.
    the codes that i using is this:

    try 1:
    Cr.LogOnServer "p2ssql.dll", ip, sql_database, sa, 123
    try 2:
    Cr.Connect = "DSN=" & ip & ";UID=sa;PWD=123" ' ;DSQ=" & sDB & ""
    try 3:
    Cr.LogOnServer "pdsodbc.dll", "servidor", "new_one", "sa", "123"
    try 4:
    Cr.LogOnServer "p2ssql.dll", ip, "new_one", "sa", "123"
    try 5:
    Cr.Connect = "PROVIDER=MSDASQL;DSN=dns_name;UID=sa;PWD=123;"

    Cr.action = 1
    in other computer i receive other error:

    cannot find database dll err. number: 20532
    and cannot logon on server

    there is other way to connect to a remote server?
    thanks a lot for your help
    a report to load values from a sql server
    i using the crystal report 6.0 in my computer i can connect using the vb6
    to the local database named "new" without problem.
    but if i try connect to other sql server i see this error:
    Unable to load report err. number: 20525
    i have installed vb6 in other computer and try to load the report
    and connect to the database server "new" and i receive the same error
    so i think there is a problem when i try to connect to a remote server.
    the codes that i using is this:

    try 1:
    Cr.LogOnServer "p2ssql.dll", ip, sql_database, sa, 123
    try 2:
    Cr.Connect = "DSN=" & ip & ";UID=sa;PWD=123" ' ;DSQ=" & sDB & ""
    try 3:
    Cr.LogOnServer "pdsodbc.dll", "servidor", "new_one", "sa", "123"
    try 4:
    Cr.LogOnServer "p2ssql.dll", ip, "new_one", "sa", "123"
    try 5:
    Cr.Connect = "PROVIDER=MSDASQL;DSN=dns_name;UID=sa;PWD=123;"

    Cr.action = 1
    in other computer i receive other error:

    cannot find database dll err. number: 20532
    and cannot logon on server

    there is other way to connect to a remote server?
    thanks a lot for your help

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: problem using crystal report 6.0

    Look for the right connection string, here
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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