#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    104
    Rep Power
    4

    ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?


    In VB6.0 code error below:

    Dim cn As ADODB.Connection
    Set cn = New Connection

    cn.ConnectionString = "Driver={SQL Server}; Server=192.168.1.54,1433; Uid=xyz;Pwd=123;Database=Northwind;"
    cn.Open

    warring error:

    [Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for user 'xyz'. The user is not associated with a trusted SQL Server connection




    In ActiveReport 2.0

    Dim rpt As New ActiveReport1

    rpt.DataControl1.Provider = "SQLOLEDB.1" ' ' "SQLOLEDB.1"
    rpt.DataControl1.ConnectionString = "Driver={SQL Server};" & _
    "Server=192.168.1.54; Uid=xyz; Pwd=123; Database=Northwind;"

    warring error:

    Error 5000 : Error in processing report.
    [ Extended Info:Invalid connection string attribute]
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    The error message tells you what's wrong. The username/password isn't valid for your sql server.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    104
    Rep Power
    4
    User/pass very good because if I replace "Server=192.168.1.54,1433" as "Server=.\SQLEXPRESS", then run normally without error. My computer SQL Server =. \ SQLEXPRESS has got IP address = 192.168.1.54. why My computer not run with the IP ?

IMN logo majestic logo threadwatch logo seochat tools logo