VBScript Replace

Discussion in 'ASP General' started by MikeR, Jan 25, 2010.

  1. MikeR

    MikeR Guest

    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'
     
    MikeR, Jan 25, 2010
    #1
    1. Advertisements

  2. MikeR

    MikeR Guest

    Ignore the previous post, please. The light came on.

    Mike
     
    MikeR, Jan 26, 2010
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.