Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 12th, 2003, 02:07 AM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Populating Combobox by Code

Hi All,

I am a biginner to VB.NET. I want to populate a combobox using hand code, from the database but could not succeed yet. I have consulted several books on the topic but no one has a tip on this.

Though some contain the tip as under:

        ComboBox1.DataSource = mDS
        ComboBox1.DisplayMember = "au_fname"

I put this code in the form_load event of the form, but this simply did not work.

Can anyone help me in this regard.

Many many Thanks to the helper in advance.

Warmest regards

Afzal
 
Old July 12th, 2003, 03:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

set DataMember to table_name of ur DB.
u can set this data visually in design time, its easer!

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Manually Populating Value in Windows Form ComboBox Ron Howerton VB.NET 2002/2003 Basics 20 February 13th, 2008 07:21 PM
Filling Combobox with value from other Combobox ayazhoda Access VBA 6 June 5th, 2007 04:58 AM
Combobox Select/Insert Code osemollie Pro VB Databases 4 June 28th, 2006 09:09 AM
Combobox Populating Delay aw23 Access VBA 24 June 8th, 2005 03:39 AM
populating a box sporkman43 Classic ASP Basics 0 August 18th, 2003 02:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.