Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub RefreshDataGrid()
- Dim con As New MySqlConnection(cnString)
- Dim da As New MySqlDataAdapter("SELECT idDepartamento AS ID, nombre AS DEPARTAMENTO FROM dbo.catDepartamentos order by ID", con)
- Dim dt As New DataTable
- Try
- da.Fill(dt)
- DataGridView1.DataSource = dt
- Catch ex As Exception
- MessageBox.Show(ex.Message)
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement