execute dynamically constructed string in if condition classic asp

Onreybbry

New Member
I am trying to execute an if condition which needs to have dynamic input. Nested if was an option but I was wondering if I can construct a query then execute the whole thing once (like SQL).

The following shows the dynamic construction of string:\[code\]For i = 1 to len(name)if (Mid(name,i,1)) = "%" then Exit ForResponse.Write(query) end ifquery1 = query1 & Mid(name,i,1)Next \[/code\]I was wondering if I can use something like:\[code\]if(query1) then ---statements--- else -----statements----\[/code\]such that I would execute the query build by the string query1
 
Back
Top