none
Searching an Access 2k3 database RRS feed

  • Question

  • I am trying to write an aspx page in Visual Web Developer 2k5 Express that will search my keywords field in the database and display all records that contain that keyword in a repeater. Can this be done?
    Saturday, June 9, 2007 6:38 AM

All replies

  • Hi,
    add a query that will filter the data that you need:

    select * from customers where firstname like @keyword or lastname like @keyword or address like @keyword or city like @keyword ....

    Then you can bind to the resulting datatable.

    Charles
    Wednesday, June 13, 2007 7:48 PM
  • don't forget to include some wildcards or your "like" clause will not work very well.

     

    You can put the wildcards in the sql and pass in keywords "raw" or you could add them to your keywords when assigning values to your parameter.

     

    Wednesday, June 13, 2007 8:21 PM