Hello again, according the lessons you gave me, I wrote a program that shows content of a table in a datagridview. Now I want to sort the content of the table based a field(ASC or DEC) and show the result in that datagridview. Database name= WirdDb, tablename= tbl2, fields: No, Code, Street, Alley, Status, Date and Time. I want to sort the content of tbl2 according field "Street" ascendingly. Would you please help me. OleDbDataAdapter adapter2 = new OleDbDataAdapter(); OleDbCommand command2 = new OleDbCommand("SELECT * from tbl2"+tbl2.Street, conn); adapter2.SelectCommand = command2; OleDbCommandBuilder cb2 = new OleDbCommandBuilder(adapter2); DataSet ds2 = new DataSet(); adapter2.Fill(ds2, "tbl2"); DataTable dt2 = ds2.Tables[0]; DataGridView dgv2 = new DataGridView(); dgv2.DataSource = dt2; this.Controls.Add(dgv2);
Sourie