Advertisement

03.03.2004 at 01:01AM PST, ID: 20905132
[x]
Attachment Details

Databinding a Control in VB.NET/SQL

Asked by jazduck in .NET

Tags: combobox, databinding

Ok..  I have no problems binding from a sql database to a control in asp.net, this time however i want to be do it in a win32 exe but i keep on running into brick walls.
In Asp.Net id use something like

    adapter.Fill(ds,"Ctype")
    DropDownList1.DataSource = ds.Tables("Ctype").DefaultView
    DropDownList1.DataTextField = "Ctype"
    DropDownList1.DataValueField = "ID"
    DropDownList1.DataBind()

Trying the same thing with a combobox doesnt work, as databind apparently isnt a member of the combobox (or any other controls ive looked at)

Help, or code snippets to do the same job would be appreciated.
JazStart Free Trial
[+][-]03.03.2004 at 02:22AM PST, ID: 10503217

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2004 at 04:46AM PST, ID: 10503992

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: .NET
Tags: combobox, databinding
Sign Up Now!
Solution Provided By: EBatista
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.03.2004 at 04:52AM PST, ID: 10504024

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2004 at 07:29PM PST, ID: 10510843

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32