Results 1 to 7 of 7

Thread: search method

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2008
    Posts
    164

    search method

    hello,
    i am making a project using search method, i am using a textbox for inputing the codenumber and 2 lblboxes for showing me the product name and the product price, how can i array this and what method should i use? i am using a DB in access2000 and how can i access the fields that being set? tnx....

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: search method

    Do you already know how to access a database? You could execute an sql against the database if that is what you want.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2008
    Posts
    164

    Re: search method

    nope, can you tell me what sql statement should i use, and i know how to access a DB, it is on the properties of the data grid? right?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: search method

    No datagrid involved. Just a straight SQL SELECT statement

    Code:
    SELECT product_name, product_price FROM yourtable
    WHERE product_code = '" & txtproductcode.text & "' "
    Naturally you have to change the field names and textbox name to reflect what you are actually using. Also, if the product code is stored as a numeric you do not need the single quotes.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2008
    Posts
    164

    Re: search method

    tnx for your reply guys, it did work... one more question, how do you use a searchstring? i am totally confused on this feature...

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: search method

    What do you mean by searchstring?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Dec 2008
    Posts
    164

    Re: search method

    for example i want to search a DB for a certain string, i guess it goes like this search$ from this column from cell1 to cell10, how do i express it in code?, tnx....

Posting Permissions

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



Click Here to Expand Forum to Full Width