Thanks for the reply Please guide me on what i should include to get all the data in that particular column.
Vibin Venugopal
Posts
-
Combobox problem -
Combobox problemHI, Am trying to retreive some data into the Visual Studio C#.net (Winforms) combobox from a access database, but when i run it, i get only the first record, Please help me out. Thanks Vibin private void Form2_Load(object sender, System.EventArgs e) { int count=0, b=0; try { con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\\JET PRINT LIMITED\\JET PRINT LIMITED.mdb"); da=new OleDbDataAdapter("select * from STOCKDET",con); con.Open(); ds=new DataSet(); da.Fill(ds,"STOCKDET"); comm.Connection=con; comm.CommandType=CommandType.Text; da=new OleDbDataAdapter(comm); dr=ds.Tables [0].Rows [b]; comboBox1.Items.Add (dr[1].ToString()); MessageBox.Show("data into Combobox successfuly!!!"); MessageBox.Show("Connected successfuly!!!"); } catch(Exception k) { MessageBox.Show(k.Message); } }