#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    Smile How To Combine 2 Query


    I have 2 tools inside my form ADODC and Datagrid. the recordsource for adodc is

    select * from directory where firstname <> 'spare'.
    the problem is i have another text for searching purposes and its gonna rewrite the recordsource like this

    select * from directory where firstname like '%' & replace(txtName.text), "'", " ' '"

    - this will show the results inside the datagrid as it follows and join the recordsource of adodc components.


    How to combine both of the query inside one procedure. where its gonna search what he/she want in the textbox and at the same time it filters which records contain 'spare' in firstname field.

    NEED URGENT HELP..Thank you
  2. #2
  3. Humble Learner
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2007
    Location
    Bangalore, India
    Posts
    280
    Rep Power
    119
    Try this

    Code:
    select * from directory where firstname <> 'spare' AND 
    firstname like '%' & replace(txtName.text) ...........
    Last edited by debasisdas; September 5th, 2012 at 08:41 AM.

IMN logo majestic logo threadwatch logo seochat tools logo