terrydiederich2
1/10/2019 - 3:12 PM

Database Return Table

Public Function GetAllTable() As DataTable
    Dim db As New dbFunctions
    Dim table As New DataTable
    Dim myAdapter As New MySqlDataAdapter

    Using con As New MySqlConnection(MyConnectionString)
        Using cmd As New MySqlCommand("Users_GetAll", con)
            cmd.CommandType = CommandType.StoredProcedure

            myAdapter.SelectCommand = cmd
            myAdapter.Fill(table)
        End Using
    End Using

    Return table
End Function