Guest User

Untitled

a guest
Jun 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Dim con As SqlConnection = Nothing
  2. Dim dTable As DataTable
  3. Dim dataAdapter As SqlDataAdapter
  4. Dim sqlcmd As String
  5. .......
  6. dTable = New DataTable
  7. dataAdapter = New SqlDataAdapter(sqlcmd, con)
  8. dataAdapter.Fill(dTable)
  9.  
  10. 'DATATABLE at this point has 10 rows in it, I verified that at runtime
  11.  
  12. gvUnitSystem.DataSource = dTable
  13. gvUnitSystem.DataBind()
  14.  
  15. End Sub
  16.  
  17. gvUnitSystem.AutoGenerateColumns = True
Add Comment
Please, Sign In to add comment