ASP.NET SQL Update

'Declare and create an instance of the object(CON) from the SqlConnetion Class
Dim CON as New SqlConnection("server= webserve;database=student;uid=student;pwd=icc;")

'Declare variable(SQL) and assign its value
Dim SQL as String="Update Products set pname=@name,pprice=@price where pid=@id"

CMD.Parameters.Add(New SqlParameter(“@id”,SqlDBType.Int))
CMD.Parameters(“@id”).Value = ProdID.text

CMD.Parameters.Add(New SqlParameter(“@name”,SqlDBType.Varchar,30))
CMD.Parameters(“@name”).Value = ProdName.text

CMD.Parameters.Add(New SqlParameter(“@price”,SqlDBType.Decimal,30))
CMD.Parameters(“@price”).Value = ProdPrice.text

'Declare and create an instance of the object(CMD) from SqlCommand Class
Dim CMD as New SqlCommand (SQL,CON)

'Execute Insert
Con.open()
CMD.ExecuteNonQuery()
Con.close()

‘ Display a message to the user
msg.text="Record Updated Successfully"