|
-
Dec 19th, 2001, 12:08 PM
#1
Thread Starter
Addicted Member
Apostrophe Error
I am using the following code to submit values to a database. How can I adjust the code to allow information with apostophes to be allowed without messing up the SQL statement? (Using VBScript)
function UpdateNearestRelative()
appid = session("appID")
sqlUpdateApplicant = "Update ApplicantInfo set"
sqlUpdateApplicant = sqlUpdateApplicant & " NearRelative = '" & Request.Form("txtNRName") & "', "
sqlUpdateApplicant = sqlUpdateApplicant & " R_Address = '" & Request.Form("txtNRAddress") & "', "
sqlUpdateApplicant = sqlUpdateApplicant & " R_City = '" & Request.Form("txtNRCity") & "', "
sqlUpdateApplicant = sqlUpdateApplicant & " R_State = '" & Request.Form("txtNRState") & "', "
sqlUpdateApplicant = sqlUpdateApplicant & " R_Zip = '" & Request.Form("txtNRZip") & "', "
sqlUpdateApplicant = sqlUpdateApplicant & " R_Phone = '" & Request.Form("txtNRPHAreaCode") & Request.Form("txtNRPHPrefix") & Request.Form("txtNRPhNum") & "' "
sqlUpdateApplicant = sqlUpdateApplicant & " where ApplID = " & appid
Conn.Execute(sqlUpdateApplicant)
end function
Thanks!
Normal is boring...
 smh 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|