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. Advertising

  2. MikeR

    MikeR Guest

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

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

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Blais
    Replies:
    1
    Views:
    366
    Bruno Desthuilliers
    Jun 27, 2006
  2. Greg Ewing
    Replies:
    2
    Views:
    334
    Dieter Maurer
    Jun 29, 2006
  3. Alun
    Replies:
    3
    Views:
    4,482
    Masudur
    Feb 18, 2008
  4. MDW
    Replies:
    0
    Views:
    118
  5. Prasad S
    Replies:
    2
    Views:
    215
    Dr John Stockton
    Aug 27, 2004
Loading...

Share This Page