Similar to Dexterity, working with ranges should be on the top of your list of things to master. Establishing a range allows you to work with a subset of data instead of everything in the database's table. When you define a range, the software treats the records in the range as if they were the only records in the database's table.
For example, if your range is set to include only documents dated in 2012, then the
GetFirst() method would return the first document dated in 2012. Similarly, the
GetLast() method would return the last document dated in 2012. In reality, the table could include documents spanning 20 years, but setting a range would make the other records invisible to your code. Pretty cool!
To set a range, you first ...