Results 1 to 3 of 3

Thread: Help required. SQL Server queries through Visual Basic. Will pay if problem is solved

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2007
    Posts
    1

    Help required. SQL Server queries through Visual Basic. Will pay if problem is solved

    Basically, what i am trying to do is i have a form in visual basic which allows the user to choose features of a product that they wish to buy via clicking on combo - boxes. Once a selection has been chosen and the "view products" button has been clicked, the products that match the features chosen by the user will be displayed. As you'll know this will be done through a query from a SQL server database.

    All that is required is example code that shows how to query the sql database.

    So for example :
    If Brand_ComboBox.SelectedIndex = 0 Then
    ?????????

    So if the first option in the brand combobox is chosen, what other code would be needed?

  2. #2
    Hyperactive Member ProphetBeal's Avatar
    Join Date
    Aug 2006
    Location
    New York
    Posts
    424

    Re: Help required. SQL Server queries through Visual Basic. Will pay if problem is solved

    What version of VB are you using?

    Helpful Links:
    VB 6 - How to get the "Key" Value in a collection
    VB.NET - File Search Utility || VB.NET - How to compare 2 directories || VB.NET - How to trust a network share
    VB.NET - Create Excel Spreadsheet From Array || VB.NET - Example Code & Hints you may not know
    VB.NET - Save JPEG with a certain quality (image compression) || VB.NET - DragDrop Files, Emails, and Email Attachments

    Please post some of the code you need help with (it makes it easier to help you)
    If your problem has been solved then please mark the thread [RESOLVED].
    Don't forget to Rate this post

    "Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-

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

    Re: Help required. SQL Server queries through Visual Basic. Will pay if problem is solved

    You are better off posting this thread in the database section instead.

    Anyway, the sql my look something like...

    Code:
    "SELECT * FROM Table WHERE Field = '" & Brand_ComboBox.List(Brand_ComboBox) & "'"
    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

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