Question : send a recordSet - string whit ""

hi, i trying to open a recordSet  
when i send  string whit "" it's return nothing

this wat i do

step 1 (function 1)
if theString <> "" then
strWhere = strWhere & " AND ExternalUserName LIKE '%" & theString & "%' OR ExternalUserEmail LIKE '%" & theString & "%' OR ExternalUserTafkid LIKE '%" & theString & "%' OR ExternalUserAddress LIKE '%" & theString & "%'"
end if

step 2
strSelect = "SELECT * FROM tbl_externalUsers WHERE projId = " & sessProjId & " AND isActive = 1 " & strWhere

function 2 i get the strSelect


rs.open (strSelect)
befor that i difind the rs...

if the string include "" i can't get the recordSet if not evriting is OK

Answer : send a recordSet - string whit ""

Option 1 (Not the good method)
Try replacing " with \"
theString = replace(theString,"""", "\""")

Option 2 (Good method)
Use parameterised SQL statements instead of building the query like you have done
Please check the following tutorial and example:
http://www.aspfaq.com/params.htm
Random Solutions  
 
programming4us programming4us