Forums

This topic is locked

replace function help please

Posted 30 Oct 2002 21:10:48
1
has voted
30 Oct 2002 21:10:48 Dave Clarke posted:
Hi

I've tried this on my page, to replace single quotes with two single quotes in a form field, however I get an error telling me I cant use parenthesis when calling a sub.

Replace(Request.Form("addmessage", "'", "''"

if i make a variable from it, it works

varMessage = Replace(Request.Form("addmessage", "'", "''"

but I dont want to use a variable as I'm inserting the form field into the database using the standard MM insert behaviour which of course takes it's values from the form.
Any ideas??

Thanks

Dave

ASP|VBScript|IIS5.1|WinXPPro & WinXPHome

Edited by - Davecl on 30 Oct 2002 21:11:57

Reply to this topic