Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   VBScript Replace (http://www.velocityreviews.com/forums/t805022-vbscript-replace.html)

MikeR 01-25-2010 11:02 PM

VBScript Replace
 
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 01-26-2010 02:01 AM

Re: VBScript Replace
 
Ignore the previous post, please. The light came on.

Mike


All times are GMT. The time now is 08:01 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.