VBScript Replace

M

MikeR

2 questions about Replace.

I have the following code. If an SWCall contains a '-X' I want to delete the record
it's the key for. I need to remove the '-X' before I do the delete query.

response.write "<br>Pre " & Request.Form("TCID")(i) & " " & SWCall
Replace (SWCall,"-X","")
response.write "<br>Post " & Request.Form("TCID")(i) & " " & SWCall
response.end
ConnTemp.DeleteQSO Request.Form("TCID")(i), SWCall, SanCall

The Replace isn't...

Pre ZS ZS2EZ-X
Post ZS ZS2EZ-X

Cannot use parentheses when calling a Sub
/domain/Feb/changeact.asp, line 55, column 24
Replace (SWCall,"-X","")

All the examples I find use parens. If I remove the parens, the error goes away, but
still no removal of the '-X'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top