Advertisement
sc2142

my code

Jan 24th, 2017
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2. If sconnection.State = ConnectionState.Closed Then
  3. sconnection.ConnectionString = "server=***********; database=*********; user id=*************; password=*************"
  4. sconnection.Open()
  5. End If
  6.  
  7. Dim sqlquery As String = "SELECT * FROM ************"
  8. Dim sqladapter As New MySqlDataAdapter
  9. Dim sqlcommand As New MySqlCommand
  10. Dim table As New DataTable
  11. Dim i As Integer
  12.  
  13. With sqlcommand
  14. .CommandText = sqlquery
  15. .Connection = sconnection
  16. End With
  17.  
  18. With sqladapter
  19. .SelectCommand = sqlcommand
  20. .Fill(table)
  21. End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement