Hi
I had one comboBox which displays all country names. Data is coming but not in sorted order. I used Hashtable to which data comes thorugh query
public void GetCountryNames(ref Hashtable ht1, ref Hashtable ht2)
{
OracleCommand vCountrynames;
vCountrynames = new OracleCommand(sqlcommandfile.GetCountrynames, oracleCon);
try
{
oracleCon.Open();
OracleDataReader Reader = vCountrynames.ExecuteReader(CommandBehavior.SingleRow);
while (Reader.Read())
{
ht1.Add(Reader.GetString(0), Reader.GetString(1));
ht2.Add(Reader.GetString(1), Reader.GetString(0));
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
finally
{
oracleCon.Close();
}
}
"Sqlcommandfile.GetCountrynames" will fetch data through Query. Given below is the query.
SELECT ITEM_NAME, ITEM_KEY FROM COUNTRY_CODE WHERE ITEM_ID='1220' and FLG= 1 ORDER BY ITEM_KEY
while debugging i found , after reader operation, ht1.Add() is there, here while adding to Hash table not adding in sorted order
Can any one help how to get sorted list
Madhavi