Этот запрос UPDATE не обновляет значения и не выдает никаких ошибок ... в чем была проблема в этом запросе?
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Using conn = New SqlConnection(constr)
Using cmd = conn.CreateCommand()
conn.Open()
Dim sql As String = "UPDATE hotels SET city =@city, hotel =@hotel, location =@location, price =@price, category =@category, short =@short, details =@details WHERE hotelid =@hotelid"
cmd.CommandText = sql
cmd.Parameters.AddWithValue("@city", TextBox1.Text)
cmd.Parameters.AddWithValue("@hotel", TextBox2.Text)
cmd.Parameters.AddWithValue("@location", TextBox3.Text)
cmd.Parameters.AddWithValue("@price", TextBox4.Text)
cmd.Parameters.AddWithValue("@category", Rating1.CurrentRating)
cmd.Parameters.AddWithValue("@short", TextBox6.Text)
cmd.Parameters.AddWithValue("@details", Editor1.Content)
cmd.Parameters.AddWithValue("@hotelid", Request.QueryString("hotelid"))
cmd.ExecuteNonQuery()
End Using
End Using
Catch ex As Exception
Response.Write(ex.Message)
End Try
Извлеченный запрос:
UPDATE hotels
SET city = @city, hotel = @hotel,
location = @location, price = @price,
category = @category, short = @short, details = @details
WHERE hotelid = @hotelid