Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim con As New SqlConnection
- Dim cmd As New SqlCommand
- Dim rd As SqlDataReader
- Try
- con.ConnectionString = "Server=KAVIER;Database=vb;Trusted_Connection=True;"
- con.Open()
- cmd.Connection = con
- rd = cmd.ExecuteReader()
- cmd.CommandText = "SELECT * FROM music where mus_id = '" & txtid.Text & "' "
- If rd.HasRows Then
- txtartist.Text = rd.Item("customer")
- txtid.Text = rd.Item("album")
- txtgenre.Text = rd.Item("genre")
- hided.Text = rd.Item("music_copies")
- txtprice.Text = rd.Item("price")
- txttotal.Text = txtprice.Text * txtwalkinquantities.Text
- End If
- con.Close()
- Catch ex As Exception
- MsgBox(ex.Message)
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement