What's wrong with this? (ComboBox Filling)
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();
}
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

thed0ct0r84 reputationPosted Oct 14, 2003, 1:22 AM EDT
tgd24 reputationPosted Oct 14, 2003, 2:01 AM EDT
thed0ct0r84 reputationPosted Oct 14, 2003, 2:37 AM EDT
bonnieb48 reputationPosted Oct 14, 2003, 4:14 PM EDT