You have no eason to use this code to do that..... Even if it worked the Dataset is very wasteful compared to a reader.
Look at: http://www.learnasp.com/freebook/learn/dbopensqlserver.aspx or http://www.learnasp.com/freebook/learn/dbopen.aspx That code fills a dropdown fine and will display error messages if any occur. After you get used to teh correct way of coding the make a library so you can get the code down to 1 line ala: http://www.learnasp.com/freebook/learn/vb_firstlib.aspx On Mon, 21 Feb 2005 04:51:54 -0800 (PST), imane elfechtani <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I have problem filling a drop down list from a > dataset. > > here is my peice of code that doesnt work: > con is my connection that I have declared, query is a > string, ds is a dataset , allCities is my dropdown... > > con = dbc.connect(); > query ="select cityName from VM_CITY"; > SqlDataAdapter comm = new SqlDataAdapter(query, con); > DataSet ds = new DataSet(); > comm.Fill(ds); > allCities.DataSource = ds; > allCities.DataBind(); > > would anyone help me plz > > Thanks :) > > Imane > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - Find what you need with new enhanced search. > http://info.mail.yahoo.com/mail_250 > > ________________________________ > Yahoo! Groups Links > > To visit your group on the web, go to: > http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
