C# School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C# Expert!

Join 307,163 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,528 people online right now. Registration is fast and FREE... Join Now!




Complex Data Binding accepts as a data source either an IList or an IL

 

Complex Data Binding accepts as a data source either an IList or an IL, having error during retaiving database using comboBox

Aizaz.Khatri

18 Aug, 2009 - 01:11 AM
Post #1

New D.I.C Head
*

Joined: 18 Aug, 2009
Posts: 1

here is the code
CODE

SqlConnection con = new SqlConnection(sqlcan);
            con.Open();
            SqlCommand com = new SqlCommand("select code from data2", con);
            SqlDataAdapter ad = new SqlDataAdapter(com);
            DataSet ds = new DataSet();
            ad.Fill(ds);

            comboBox2.DataSource = ds.Tables[0].ToString();


im having error
" Complex Data Binding accepts as a data source either an IList or an IListSource "


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 06:08PM

Live C# Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month