anyone help with this?
I have a unique id on each line of sql, i want to be able to update a row from a table i tested and tested this but unable to get this working. does anyone know how i am able to do this?
Dim PINV As String
PINV = Me.txtPassword.Text
Dim con As New SqlConnection
Dim cmd As New SqlCommand
Try
con.ConnectionString = "Data Source=10.10.0.25;Initial Catalog=RConditions;Persist Security Info=True;User ID=mbish;Password=mbish"
con.Open()
cmd.Connection = con
cmd.CommandText = "update Settings SET pin =" & PINV & "where Company = '1')"
cmd.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show("Error while inserting record on table..." & ex.Message, "Insert Records")
Finally
con.Close()
End Try
MsgBox("Pin Saved")
End Sub