Problem reading from combo box

Discussion in 'C#' started by yComms, Aug 28, 2010.

  1. yComms

    yComms New Member

    Joined:
    Aug 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I'm new to both this Forum and C#.
    I am currently working on a project and I'm having problem with the following:


    I populated a comboBox (windows form) with data from an OleDb database, I intend to re-use any selected data from the comboBox by inserting it to another table on the database. I have absolutely no problem doing this with a textbox but the comboBox and ListBox are giving me some problem.

    Example
    ----------
    INSERT INTO TableName (Column1, Column2) VALUES ('"textBox1.text"', '"combBox1...."')

    As I said, the textbox works if I don't include the comboBox, but I've tried different methods for the comboBox e.g. .SelectedText, .SelectedItem and etc please help.

    Thanks
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice