CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Sep 2007
    Posts
    405

    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
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Could it be something like in http://support.microsoft.com/kb/889615 ?
    Victor Nijegorodov

  3. #3
    Join Date
    Sep 2007
    Posts
    405

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Quote Originally Posted by VictorN View Post
    Could it be something like in http://support.microsoft.com/kb/889615 ?
    I have read your link but it not

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    According to your thread on the other forum you are using SQL Server Express and not SQL Server. There is a difference namely that you need to specify the instance when using the express version

    Server\SQLExpress
    Always use [code][/code] tags when posting code.

  5. #5
    Join Date
    Sep 2007
    Posts
    405

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    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 ? you see attach file my config SQL Server 2005 express
    Attached Images Attached Images  

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Quote Originally Posted by dongtrien View Post
    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 ?
    Because your connection string (at least its Server part is wrong.
    Try
    Code:
    "Server=192.168.1.54.\SQLEXPRESS"
    Victor Nijegorodov

  7. #7
    Join Date
    Sep 2007
    Posts
    405

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Now, My computer run Server=192.168.1.54,1433"(IP LAN) but address IP out internet not run. I also check this item?

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Quote Originally Posted by dongtrien View Post
    Now, My computer run Server=192.168.1.54,1433"(IP LAN) but address IP out internet not run. I also check this item?

    Sorry, I could not understand what you meant!
    Please, show the full connection string that does work and the one that does not (and with what error!)
    Victor Nijegorodov

  9. #9
    Join Date
    Oct 2013
    Posts
    1

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Please, show the full connection string that does work and the one that does not (and with what error!)
    I guess you can test your connection on a demo server with RESTful interface for SQL data here and it auto debugs and clears all injected errors.

  10. #10
    Join Date
    Sep 2007
    Posts
    405

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    I set "Server=192.168.1.54,1434" then run normally, If i replace network address IP "Server=network address IP,1434", It will warning error: "Error 5000 : Error in processing report.
    [ Extended Info:[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ''. The user is not associated with a trusted SQL Server connection.]". I have tested the network IP address and open port 1434 by telnet command [OK]

  11. #11
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Victor Nijegorodov

  12. #12
    Join Date
    Sep 2007
    Posts
    405

    Re: ConnectionString SQL Server 2005 with ActiveReport 2.0 via address IP ?

    Quote Originally Posted by VictorN View Post
    I have seen this page before, but still not

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