Consulting

Results 1 to 5 of 5

Thread: Solved: MS SQL OLEDB struggling

  1. #1

    Solved: MS SQL OLEDB struggling

    I have used a Connection to the MS-SQL 2005 under Excel 2003 and run under the Server "Server001" with the instance "Instance001", and
    it does not matter I use Uid/User ID or Pwd/Password I get the same error
    "Login failed for user User001". Also, I have tried to have user as "User001" and "Server001\User001", they yield the same error. Any ideas !?
    Also, I logged in the server (where I run the Excel) as "Server001\User001" ( dbowner of "AdventureWorks"). This is the partial code ...Thanks !

    [VBA]Dim Conn As ADODB.Connection
    Const ConnectionString As String = _
    "Provider=SQLOLEDB.1;" & _
    "Server=Server001\Instance001;" & _
    "Database=AdventureWorks;" & _
    "Uid=User001;" & _
    "Pwd=pass001"

    On Error GoTo ShowError

    Set Conn = New ADODB.Connection

    Call Conn.Open(ConnectionString)

    ShowError:
    If (Err.Number <>0) Then Debug.Print Err.Description[/VBA]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    What version of MDAC do you have?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    MDAC 2.8, Sir! gracias!

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    So are you solved now?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Yes, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •