if i need to extract from data base in asscending order, wat should i add on the the below statement?
ViewAppt.RecordSource = "SELECT * FROM APPOINTMENT_T WHERE (PATIENT_ID = '" + NRICtxt.Text + "' ) ORDER BY APPOINTMENT_DATE, START_TIME"
Printable View
if i need to extract from data base in asscending order, wat should i add on the the below statement?
ViewAppt.RecordSource = "SELECT * FROM APPOINTMENT_T WHERE (PATIENT_ID = '" + NRICtxt.Text + "' ) ORDER BY APPOINTMENT_DATE, START_TIME"
what type of database r u using? access or sql server or oracle??
That Query should return your fields in ascending order, ASC is default, and when you want descending order you have to add DESC after each field in Order by clause