Results 1 to 2 of 2

Thread: Error [28000]

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2018
    Posts
    1

    Error [28000]

    Hi,

    I wrote a simple app to test DSN Connection as follows:

    Code:
        Private Sub btnDscConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDscConnect.Click
            Dim cn As Odbc.OdbcConnection
            cn = New Odbc.OdbcConnection("dsn=BsReportTemplate;uid=sa;Password=pspl;")
            Try
                cn.Open()
                MsgBox("Connection Success To Edit")
            Catch SqlEx As Exception
                MessageBox.Show(SqlEx.Message)
            End Try
    
        End Sub
    when I execute it, I get the below error message :
    ERROR [28000] [Microsoft] [ODBC SQL Server Driver][Sql Server]Login Failed for User 'sa'
    Can anybody Help solve this issue ?
    Attached Images Attached Images  
    Last edited by dday9; Oct 9th, 2018 at 08:11 AM. Reason: Added Code Tags

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,588

    Re: Error [28000]

    It looks like not only do you have the wrong login credentials for that user (i.e. the username and/or password is incorrect), but you also have an invalid connection String.

    My go-to place for connection strings is here: https://www.connectionstrings.com/ and for this specific database: https://www.connectionstrings.com/sql-server/

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