Well I was testing out my program for bugs an I found one...
I have a text box that is used for a description of a movie, when I execute the update sql statement it accepts all characters with no errors except the apostrophe which when used it errors out. I suppose it interferes with the string used to update the database. I tried the keydown event work fine but, it also applies for the quotation char since they are in the same key. Any ideas on what to do to prevent or work around the apostrophe. Thanks in advance.
Here is the sql statement I use..
strSql = "Update movies set title = '" & txtTitle.Text & "' , " & "category = '" & cmbCategory.Text & "' , " & "Ratings = '" & cmbRatings.Text & "' , " & "Length = '" & nudLength.Text & "', " & "Movielocation = '" & txtMovielocation.Text & "', " & "userReview = '" & TbuserReview.Value & "' ," & "Description = '" & txtdescription.Text & "'" & "where title = '" & item & "'"
I have a text box that is used for a description of a movie, when I execute the update sql statement it accepts all characters with no errors except the apostrophe which when used it errors out. I suppose it interferes with the string used to update the database. I tried the keydown event work fine but, it also applies for the quotation char since they are in the same key. Any ideas on what to do to prevent or work around the apostrophe. Thanks in advance.
Here is the sql statement I use..
strSql = "Update movies set title = '" & txtTitle.Text & "' , " & "category = '" & cmbCategory.Text & "' , " & "Ratings = '" & cmbRatings.Text & "' , " & "Length = '" & nudLength.Text & "', " & "Movielocation = '" & txtMovielocation.Text & "', " & "userReview = '" & TbuserReview.Value & "' ," & "Description = '" & txtdescription.Text & "'" & "where title = '" & item & "'"