Hello,
I am trying to make a variable appear in an SQl but am not sure how. Here is the sample code...
if Request("regtrans") = "" then
regtrans_update = "null"
else
regtrans_update = Request("regtrans")
end if
if Request("warranty") = "" then
warranty_update = "null"
else
warranty_update = Request("warranty")
end if
sqlsave = "INSERT INTO fib_treat (fib_treat_warr_id,fib_treat_regtrans,fib_treat_su rname,fib_treat_date_treat,fib_treat_kit,fib_treat _del_cust) VALUES ('" &Request("warranty_update") &"','" &Request("regtrans_update") &"','" &escapesql(Request("surname")) &"','" &Request("date_treated") &"','" &Request("kit") &"','" &Request("del_date") &"')"
objConn.Execute sqlsave
All the fields are coming from a form which has been submitted. I I do Response.Write Ion the variables...
Response.Write regtrans_update
Response.Write warranty_update
It show's the correct responses as per the if statements above. I just don't know how to get the variable into the SQL?
Any idea's?
Dave