ListBox database insert

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whitaker
    New Member
    • Feb 2010
    • 1

    ListBox database insert

    I'm using VB.Net and SQL Server 2005.
    I have two Listboxes that users can select multiple values. Selection Mode =
    Multiple.

    Listbox1 has Customers
    Listbox2 has Products

    I would like users to select a Customer (single value) from Listbox1 and Products (Multiple values) from ListBox2
    I need to insert the selected values into
    the database like this:

    John Shampoo
    John Toothpaste
    John ShowerGel

    How can I Insert these values with a single Click event into the History table?

    Thanks.

    Whitaker
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Where is your code? Show us what u came up with so far, we will help you to debug / point you in the correct direction. :)

    Comment

    • ThatThatGuy
      Recognized Expert Contributor
      • Jul 2009
      • 453

      #3
      get the selected items from the list box such as

      ListBox1.Select edItems you'll get all the selected items, then frame the sql insert query accordingly

      Comment

      Working...