The captured code is in the early stage and far from finished. Since the number of students is large, the captured code does the following jobs.
- Shows 14 students in a DataListView which is a subclass of ObjectListView
- When the user press a key, there will be a routine issues the select statement
int Z_rows = 14
"SELECT Top " + Z_rows.ToString() + " StudentID,Surname,GivenName,MiddleName,ChiName,Remarks "
+ "FROM Student "
+ "Where Cast(Surname as char(50))+Cast(GivenName as char(50))+Cast(MiddleName as char(50![143110-program.gif][1]))+Cast(StudentID as char(10))>'"
+ M_Surname + M_GivenName + M_MiddleName + M_StudentID.PadLeft(10) + "' "
+ "Order by Surname,GivenName,MiddleName,StudentID";
Indexes
Surname, GivenName, MiddleName, StudentID
So that when a new student is added into the table, the student will be found immediately.
However, error is found at line 40. Grateful if any body can tell me how to fix it.
TIA