4
Answers

What's wrong with this? (ComboBox Filling)

tgd

tgd

21y
2.8k
1
Some help, please... SqlCommand cmd = GlobalVar.Connection.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "SELECT CurrSymb FROM GNCurrency ORDER BY CurrSymb"; SqlDataAdapter da = new SqlDataAdapter(); DataSet ds = new DataSet(); da.SelectCommand = cmd; da.Fill(ds, "Moneda"); cboValuta.DataSource = ds; for(int i = 0; i < ds.Tables["Moneda"].Rows.Count; i++) { cboValuta.Text = ds.Tables["Moneda"].Rows[i]["CurrSymb"].ToString(); }
Answers (4)