Hello all,
I have a webform that when submitted updates an Access database. I had a customer today that has and apostrophy in their email address (ie strong'man@yahoo.com). I was recieving a syntax error because of this. My code works like this. Submit form, assign a request.form value to a variable, place variable in SQL string, update DB. How can I use a similar technique and keep the apostrophy?
Acutal Code:
Dim first, last, Title, Cname, Address, City, State, Zip, Phone, fax, Email
Dim orig, quality, reo, q1, q2, q3, loc
first = Request.Form("first"
last = Request.Form("last"
title = Request.Form("Title"
cname = Request.Form("cname"
Address = Request.Form("Address"
City = Request.Form("City"
State = Request.Form("State"
Zip = Request.Form("Zip"
Phone = Request.Form("Phone"
fax = Request.Form("fax"
Email = Request.Form("Email"
orig = Request.Form("c1"
quality = Request.Form("c2"
reo = Request.Form("c3"
q1 = Request.Form("q1"
q2 = Request.Form("q2"
q3 = Request.Form("q3"
INSERT INTO Orlando (Fname, Lname, Title, Company, Address, City, State, Zip, Phone, Fax, Email, Origination, Quality, REO, q1, q2, q3) VALUES ('"&first&"', '"&Last&"', '"&Title&"', '"&cname&"', '"&Address&"', '"&City&"', '"&State&"', '"&Zip&"', '"&Phone&"', '"&Fax&"', '"&Email&"', '"&Orig&"', '"&Quality&"', '"&REO&"', '"&q1&"', '"&q2&"', '"&q3&"')"
Any help would be great.
Oldwen
I have a webform that when submitted updates an Access database. I had a customer today that has and apostrophy in their email address (ie strong'man@yahoo.com). I was recieving a syntax error because of this. My code works like this. Submit form, assign a request.form value to a variable, place variable in SQL string, update DB. How can I use a similar technique and keep the apostrophy?
Acutal Code:
Dim first, last, Title, Cname, Address, City, State, Zip, Phone, fax, Email
Dim orig, quality, reo, q1, q2, q3, loc
first = Request.Form("first"
last = Request.Form("last"
title = Request.Form("Title"
cname = Request.Form("cname"
Address = Request.Form("Address"
City = Request.Form("City"
State = Request.Form("State"
Zip = Request.Form("Zip"
Phone = Request.Form("Phone"
fax = Request.Form("fax"
Email = Request.Form("Email"
orig = Request.Form("c1"
quality = Request.Form("c2"
reo = Request.Form("c3"
q1 = Request.Form("q1"
q2 = Request.Form("q2"
q3 = Request.Form("q3"
INSERT INTO Orlando (Fname, Lname, Title, Company, Address, City, State, Zip, Phone, Fax, Email, Origination, Quality, REO, q1, q2, q3) VALUES ('"&first&"', '"&Last&"', '"&Title&"', '"&cname&"', '"&Address&"', '"&City&"', '"&State&"', '"&Zip&"', '"&Phone&"', '"&Fax&"', '"&Email&"', '"&Orig&"', '"&Quality&"', '"&REO&"', '"&q1&"', '"&q2&"', '"&q3&"')"
Any help would be great.
Oldwen