SHARE
TWEET

my code

sc2142 Jan 24th, 2017 5 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top