Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

need help to create connection to mysql database

Someone please help me create the connection to a mysql server....  
0
prowebinteractive
Asked:
prowebinteractive
  • 3
  • 3
1 Solution
 
maralansCommented:
0
 
prowebinteractiveAuthor Commented:
this code does not work..

undefined  MySql.Data.MySqlClient.MySqlConnection...

       Dim conn As New MySql.Data.MySqlClient.MySqlConnection
        Dim myConnectionString As String

        myConnectionString = "server=127.0.0.1;" _
                    & "uid=root;" _
                    & "pwd=12345;" _
                    & "database=test;"

        Try
            conn.ConnectionString = myConnectionString
            conn.Open()

        Catch ex As MySql.Data.MySqlClient.MySqlException
            MessageBox.Show(ex.Message)
        End Try
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
maralansCommented:
That connection string was an example from one of the links.  You need to change the network address, userId, password and database name to connect to your mySql server.
0
 
prowebinteractiveAuthor Commented:
THAT PART i KNOW, BUT THE PROGRAM WILL NOT COMPILE
0
 
prowebinteractiveAuthor Commented:
am I missing a component, or some sort of driver
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now