This is my piece of code that doesn't work. Nothing is shown in the grid
Dim cmd As New SqlClient.SqlCommand
cmd.CommandText = utakmice.utakmice_SQL
Dim DS As New DataSet()
Dim con As New SqlClient.SqlConnection("Data Source=TNT\SQLEXPRESS;Initial Catalog=kladionica;Integrated Security=True")
Dim adapter As New SqlClient.SqlDataAdapter(cmd)
adapter.SelectCommand.Connection = con
con.Open()
adapter.SelectCommand.CommandText = "select * from parovi"
dgStats.DataSource = adapter
adapter.Fill(DS)
dgStats.Refresh()
con.Close()
Dim cmd As New SqlClient.SqlCommand
cmd.CommandText = utakmice.utakmice_SQL
Dim DS As New DataSet()
Dim con As New SqlClient.SqlConnection("Data Source=TNT\SQLEXPRESS;Initial Catalog=kladionica;Integrated Security=True")
Dim adapter As New SqlClient.SqlDataAdapter(cmd)
adapter.SelectCommand.Connection = con
con.Open()
adapter.SelectCommand.CommandText = "select * from parovi"
dgStats.DataSource = adapter
adapter.Fill(DS)
dgStats.Refresh()
con.Close()