Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
Dim constr As String = "//Input your database connection string here"
Using con As New MySqlConnection(constr)
Using cmd As New MySqlCommand("GetStudentInfo", con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@ids", 1)
Using sda As New MySqlDataAdapter(cmd)
Dim dt As New DataTable()
sda.Fill(dt)
sfDataGrid1.DataSource = dt
End Using
End Using
End Using
End Sub |