Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

error in update statement..how to correct it?

$
0
0
 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        con1.Open()
        cmd.Connection = con1
        cmd.CommandText = "update Employee set Emp_Name='" & TextBox2.Text & "',Address='" & TextBox3.Text & "',Position='" & TextBox4.Text & "',NIC_No='" & TextBox5.Text & "',Marital_Status='" & TextBox6.Text & "',Department='" & TextBox7.Text & "',Date_of_Join='" & TextBox8.Text & "',Contact_No=" & TextBox9.Text & " where Emp_ID='" & Textbox1.Text & "'"
        x = cmd.ExecuteNonQuery()
        If (x = 1) Then
            MsgBox("Update Success")
        End If
        con1.Close()
        clear()


Viewing all articles
Browse latest Browse all 51036

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>