i create a code to delete a data in sql server..but nothing works anyone outhere help me spot the problem..
]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim varAdapter As SqlDataAdapter
MsgBox("are you sure want to delete?, important information will be erase. ")
'varConnection = New SqlConnection("Server=(local);user id=sa;password=;Initial Catalog=ROP1") 'STEP 1
'varConnection.Open() 'STEP 2
varQuery = "DELETE FROM tbl_rop WHERE Name_User ='" & TextBox1.Text & "', Date_of_birth= '" & TextBox2.Text & "' , Hobbies='" & TextBox3.Text & "' , Phone_Number ='" & TextBox4.Text & "'" 'STEP 3
varCommand = New SqlCommand(varQuery, varConnection)
varCommand.ExecuteNonQuery()
varCommand.Dispose() 'STEP 6
varConnection.Close() 'STEP 7
varAdapter.Update(varDataSet)
End Sub