View Single Post
  #3 (permalink)  
Old June 16th, 2005, 04:40 PM
phungleon phungleon is offline
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Vijay,
Thank you very much for your help. I tried your method and I got this error message: "Microsoft VBScript runtime (0x800A000D) Type mismatch: 'CHARINDEX'"

HERE ARE MY CODES:
strList=Request.Form("fields_of_interest[]")
ArrChecked = split(strList)

For i=lbound(ArrChecked) to ubound(ArrChecked)
    mySQL = mySQL & CHARINDEX(ArrChecked(i), aMajor) > 0
    If i < ubound(ArrChecked) then mySQL = mySQL & " AND "
Next

Any idea of what is causing this? I know that the CHARINDEX function is to find the expressions of the selected text boxes, and look for it in the "AMajor" column. I don't understand where the 'type mismatch' comes from. I searched the Microsoft site, but couldn't find the answer. Please help.
Thank you.
Leon


Reply With Quote