Home > DeveloperSection > Interviews > When I assigned a primary key to my table in Microsoft Access, I was expecting my data to be sorted. Am I using the correct procedure?

Posted on    May-05-2011 12:47 AM

 MS Access MS Access 
 1 Answer(s)
  2025  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Posted on    May-05-2011 12:00 AM

Some developers occasionally rely on indexes to sort their data, but shouldn't. That's because an index is an internal Jet operation that relies on internal rules to speed sorting, which is not the same as actually performing the sort. Records are not stored differently or changed. The sort is not performed until an action is being taken against the data like a query. This is not the same as simply opening a table in its Datasheet View. Although an index often appears to sort data, those internal rules often conflict with normal sorting practices and can have unexpected results. Sorting can be accomplished through the use of a query where ascending or descending can be specified against any one of the fields chosen from the table.

Don't want to miss updates? Please click the below button!

Follow MindStick