Search String errors

Results 1 to 2 of 2

Thread: Search String errors

  1. #1
    Join Date
    Dec 1969
    Posts
    16

    Default Search String errors

    What is wrong with the second statment<BR>1st statment (works fine)<BR>If Session("cboSearchType") = "Message Description" Then<BR> StrSQL = StrSQL & " WHERE LinkDesc LIKE &#039%" & Session("txtSearchString") & "%&#039"<BR><BR>WHEN i add the second part it does not work, the search should display all records with LinkDesc and/or LinkTitle (that is anymention of the words counters in either field)<BR><BR>If Session("cboSearchType") = "Message Description" Then<BR> StrSQL = StrSQL & " WHERE LinkDesc LIKE &#039%" & Session("txtSearchString") & "%&#039 OR WHERE LinkName LIKE &#039%" & Session("txtSearchString") & "%&#039" <BR><BR><BR>thanks<BR>

  2. #2
    Sathiya Guest

    Default RE: Search String errors

    Change the SQL as given Below<BR> OLD<BR>StrSQL = StrSQL & " WHERE LinkDesc LIKE &#039%" & Session("txtSearchString") & "%&#039 OR (WHERE) LinkName LIKE &#039%" & Session<BR>("txtSearchString") & "%&#039" <BR>--------------<BR>New<BR>StrSQL = StrSQL & " WHERE LinkDesc LIKE &#039%" & Session("txtSearchString") & "%&#039 OR LinkName LIKE &#039%" & Session<BR>("txtSearchString") & "%&#039" <BR><BR>I think this might help you.<BR><BR>Sathiya<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •