Link to home
Start Free TrialLog in
Avatar of leechoonhwee
leechoonhwee

asked on

Crystal Report Logon method

Hi all,

I have the following logon which works fine with ODBC

 For Each Table In theReport.Database.Tables
            Dim Logon As CrystalDecisions.Shared.TableLogOnInfo
            Logon = Table.LogOnInfo
            Logon.ConnectionInfo.ServerName = "ODBCServerName"
            Logon.ConnectionInfo.DatabaseName = "MyDatabase"
            Logon.ConnectionInfo.Password = "MyPassword"
            Logon.ConnectionInfo.UserID = "MyUserID"
            Table.ApplyLogOnInfo(Logon)
        Next

However, I switched service provider which does not have ODBC available and in this case, how do I modify the above to convert the ODBC to ip address instead?
Avatar of hafeezmca
hafeezmca
Flag of United Arab Emirates image

Hi, to which database you will be connecting now?
Avatar of leechoonhwee
leechoonhwee

ASKER

I have migrated everything to another service provider and hence everything is the same except the server

Therefore, in the past I am using ODBC but now I have to use IP address instead
Try to change this with the ipaddress:

Logon.ConnectionInfo.ServerName = "IPAddress" provided that your databasename, username & password are the same on the new provider as well.
I tried that of course but it does not work. I was on the impression that

Logon.connectioninfo.servername only refers to DSN name only?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial