Hi, i was just wondering how I get user details from a user table from a mysql database.

Ive already worked out how to connect to the server, im just wondering how to import the data into a datagrid.

Thanks


Heres my current code

Imports MySql.Data.MySqlClient
Module sql
   
    Dim Connection As New MySqlConnection("server=" & Form1.txtServer.Text & ";user id=" & Form1.txtUsername.Text & "; password=" & Form1.txtPassword.Text & "; port=3306; database=" & Form1.txtdb.Text & "; pooling=false")

    Public Sub Connect()
        Try
            Connection.Open()
            MsgBox("Connected to: " & Form1.txtServer.Text)
            Form2.Show()
        Catch ex As MySqlException
            MsgBox(ex.Message)
        End Try
    End Sub
    
End Module

Recommended Answers

All 5 Replies

K thanks will take a peak

Biggest problem im having is that im using VS 2010 and everything is in VB 5 or 6

Did you found any way through it? as i also have similar problem, i just need to check if the record is available in the mysql database or not and get particular fields if it is available.

If you have got some solution please do post your code and program.

Thanks


K thanks will take a peak

Biggest problem im having is that im using VS 2010 and everything is in VB 5 or 6

Thanks, can we do it with php without using dotnet connector?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.