SHARE
TWEET

RefresDataGridvbnet

a guest Apr 4th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub RefreshDataGrid()
  2.    
  3.     Dim con As New MySqlConnection(cnString)
  4.     Dim da As New MySqlDataAdapter("SELECT idDepartamento AS ID, nombre AS DEPARTAMENTO FROM dbo.catDepartamentos order by ID", con)
  5.     Dim dt As New DataTable
  6.    
  7.     Try
  8.         da.Fill(dt)
  9.         DataGridView1.DataSource = dt
  10.     Catch ex As Exception
  11.         MessageBox.Show(ex.Message)
  12.     End Try
  13. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top