Results 1 to 2 of 2

Thread: Fill combobox with data from MySQL tables

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    115

    Fill combobox with data from MySQL tables

    I have a combobox in my form which I want to fill with data from one column in an SQL database. Any idea on how I do this?

    Kind Regards

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Fill combobox with data from MySQL tables

    Query the database and populate a DataTable, then bind the DataTable to the ComboBox using its DataSource and DisplayMember properties. If you're not sure how to query the database then follow the Database FAQ link in my signature for information.

    Note that there is a MySQL-specific ADO.NET provider available for download from the MySQL web site.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

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