Search Box Combining two columns (Search Page) ASP.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nemphyst
    New Member
    • Jan 2013
    • 3

    Search Box Combining two columns (Search Page) ASP.NET

    I am having some trouble in my search.aspx page (Search Page)

    This is my code:
    Code:
    <asp:AccessDataSource runat="server" ID="AccessDataSource1" DataFile="_private/records.mdb" SelectCommand="SELECT * FROM [DriversRecords] WHERE ([LastName] LIKE '%' + ? + '%') OR ([FirstName] LIKE '%' + ? + '%')">
       <SelectParameters>
       <asp:formparameter FormField="LastName1" Name="FirstName" Type="String" />
       <asp:formparameter FormField="LastName1" Name="LastName" Type="String" />
       </SelectParameters>
    </asp:AccessDataSource>
    When I type the first name in text box...It's Working the same when i type the last name.

    But when i'm trying to combine them such us I'm going to type in textbox : "George Santos" the result is "No data found"??

    Combing two columns returns to null?? How to do it?
    Last edited by PsychoCoder; Jan 6 '13, 09:25 PM. Reason: Code tags added
  • Nemphyst
    New Member
    • Jan 2013
    • 3

    #2
    PROBLEM SOLVED! don't need to answer.

    Comment

    • Anas Mosaad
      New Member
      • Jan 2013
      • 185

      #3
      I'm glad that your problem was solved. Please share the solution to help someone that might have the same issue in the future.

      Comment

      Working...