I have a one record table, part of which consists of three fields which store image names.
menu_image_1, menu_image_2 and menu_image_3
To delete either of these images from the record, I am attempting to use the script below. The querystring "image" contains the field name of the appropriate image, and I am trying to dynamically insert it into the Query, but it keeps giving me a syntax error message:
empty_value = null
Set rs_deleteimage = Server.CreateObject("ADODB.Recordset")
rs_deleteimage.ActiveConnection = MM_conn_db_STRING
rs_deleteimage.Source = "UPDATE tbl_menu SET ' " & request.querystring("image") & " ' = '" & empty_value
rs_deleteimage.CursorType = 0
rs_deleteimage.CursorLocation = 2
rs_deleteimage.LockType = 1
Set rs_deleteimage = Nothing
What is the correct syntax for including this querystring in the query?