Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use the string variable to represent in the Condition statement

Status
Not open for further replies.

dormingo

MIS
Mar 2, 2006
12
MY
<%
case1=""
case1=case1 & " (action1="""" and action2="""" and
case1=case1 & " or (action1="""" and action2<>"""" "


if case1 then
##########
end if
%>

Error Occured: Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: " (action1="" and act"]'

* I just want to use the variable to represent the string.
can somebody tell me the reason, Thank You.
 
[tt]case1=""
case1=case1 & "(action1=[red]""[/red] and action2=[red]"")[/red][red]"[/red]
case1=case1 & " or (action1=[red]""[/red] and action2<>[red]"")[/red]"
[/tt]
 
I see, may be you mean this as well after setting up case1 string.
[tt]
if [red]eval([/red]case1[red])[/red] then
##########
end if
[/tt]
 
Thank you tsuji. I get the answer. thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top