Dim str As String
str = String.Empty
Dim Service_Name As String
Dim colindex As Integer = 1
Service_Name = DirectCast(GridviewOdin.Rows(e.RowIndex).FindControl("Service_Name"), TextBox).Text
str = "SELECT COUNT(*) FROM tbl_Service WHERE LTRIM(RTRIM(Service_Name))='" & Service_Name & "'"
mycommand = New SqlCommand(str, myconnection)
Dim mCount As Integer = mycommand.ExecuteScalar()
'myconnection.Close()
If mCount = 0 Then
update procedure
else
MsgBox("Duplicate Service Found", MsgBoxStyle.OkOnly, "")
end if
This above is my query i cant update the grid with the same record present in the grid but if i update new records it will check and update but existing records cannot be update in the same row
how can i solve this error
Thanks & Regards
Priti