Search a database using 3 fields and an input text box.

Discussion in 'ASP .Net' started by Miguel Dias Moura, Nov 25, 2004.

  1. Hello,

    What I know:
    To send a Value in the URL and filter the results in order to display
    only the database records which FIELD_A = Value.

    What I need to do:

    I have a page with an Input Text Box and a Search Button.
    Each record of my database has 5 fields:
    ID, Title, Author, Editor, Date.

    In the Input Text Box keywords are entered by the user.
    When the Search Button is pressed I want to show all records, in a new
    page, which contains one of those keywords in Title, Author or Editor
    fields.

    Can someone help me out with this?

    I am working with Dreamweaver MX 2004 and ASP.Net / VB.

    Thank You,
    Miguel
    Miguel Dias Moura, Nov 25, 2004
    #1
    1. Advertising

  2. Miguel,
    This is more of a database question than anything because your query
    will have to do the heavy lifting. Your query will have to compare each
    keyword to your fields. From the ASP.NET side it's easy. Just do a
    Split( ) on the textbox value to get an array of keywords. After that, it's
    SQL. I'm assuming that you are capable with SQL, so I will suggest that you
    pass in the keywords to the query in a comma-separated string. Then in your
    query, you can convert this string to a rowset and perform the joins and
    comparisons necessary.

    For help with your query, I suggest posting to a SQL newsgroup. The ASP.NET
    side is easy.

    Best regards,
    Jeffrey Palermo

    "Miguel Dias Moura" <> wrote in message
    news:...
    > Hello,
    >
    > What I know:
    > To send a Value in the URL and filter the results in order to display
    > only the database records which FIELD_A = Value.
    >
    > What I need to do:
    >
    > I have a page with an Input Text Box and a Search Button.
    > Each record of my database has 5 fields:
    > ID, Title, Author, Editor, Date.
    >
    > In the Input Text Box keywords are entered by the user.
    > When the Search Button is pressed I want to show all records, in a new
    > page, which contains one of those keywords in Title, Author or Editor
    > fields.
    >
    > Can someone help me out with this?
    >
    > I am working with Dreamweaver MX 2004 and ASP.Net / VB.
    >
    > Thank You,
    > Miguel
    >
    Jeffrey Palermo [MCP], Nov 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ashutosh
    Replies:
    3
    Views:
    8,990
    Andrew Thompson
    Jun 16, 2005
  2. Gnarlodious
    Replies:
    4
    Views:
    17,579
    elizas
    May 5, 2010
  3. cjl
    Replies:
    1
    Views:
    10,495
    Michael Winter
    Oct 31, 2005
  4. cjl
    Replies:
    7
    Views:
    179
    Thomas 'PointedEars' Lahn
    Oct 30, 2005
  5. Replies:
    23
    Views:
    499
    Tim Streater
    Dec 18, 2013
Loading...

Share This Page