Dim conn As New SqlConnection("ConnectionStringGoesHere")
Dim cmd As New SqlCommand
conn.Open()
cmd.Connection = conn
cmd.CommandText = "Delete From bookings where Bk_id = " & CInt(datagridView1.Item(0,datagridView1.CurrentRow.Index).Value.ToString)
cmd.ExecuteNonQuery()
conn.Close()
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
alapeh commented: useful and work! +0
Naruse commented: Good +2
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
skatamatic commented: Looks like the OP forgot to +1 you +9
Vega_Knight commented: Nice Code :D +2
Begginnerdev commented: Beat me to it. :) +5
Jx_Man 987 Nearly a Senior Poster Featured Poster
Asitha_1 commented: Working correctly.. Thanks.. +0
Jx_Man 987 Nearly a Senior Poster Featured Poster
luckynisarg commented: Good +0
Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster
M.Waqas Aslam commented: nice work +5
Sturdy commented: Perfect +2