How come when I load my project on Visual Studio 2008, it shows a MySQL error: Unable to connect to any specified MySQL hosts.? then another error: Access denied for user

I am not yet running the application.

Also


My MySQL codes are contained in one module, I am using a procedure to call MySQL error.

Every mySQL procedure looks like this

Public Function MySQL1
        ': Connection Declarations
        ': mySQL Query
        Try
                ': Connection Open
                ': Data Read and Write
                ': Close Connection
        Catch ex As Exception
            ' Display error based on error number(Err.Number)
            MySQLError(Err.Number)
        End Try
    End Function

This is my code for the mySQL Error

Public Sub MySQLError(ByVal ErrorNumber As Integer)
        Select Case ErrorNumber
            Case 91 : MsgBox("Error: Server error" & ErrorToString())
            Case 1041 : MsgBox("Error: Server error")
            Case 1044 : MsgBox("Error: DB Error")
            Case 1045 : MsgBox("Error: Access denied")
            Case 1049 : MsgBox("Error: DB Error - Check the DB Name")
            Case Else
                MsgBox("Error Number: " & Err.Number & " Error: " & ErrorToString())
        End Select
    End Sub

When Loading my project on Visual Studio, the errors mentioned appears with an Error Number 5.

When I edit the Case Else MsgBox to MsgBox("LALA"), it will still appear as if it wasn't edited at all.

Edited 7 Years Ago by yorro: n/a

This article has been dead for over six months. Start a new discussion instead.