on 02-07-2007 8:08 PM
Good Afternoon
Experts:
I have quite the dilemna this afternoon. My application performs a simple select all records from a table to initialize navigation...previous, next, first and last.
However, I now have added a routine to load the last viewed record, by the
logged on User, in the recordset. This now causes the original navigation
to not be in order.
My Question:
Is it possible to perform the select all records and then position a "cursor/index/reference starting point" to a value in that recordset?
Example:
Recordset returns:1,2,3,4,5,6,7,8,9...etc
LastViewed = 5 so base all navigation off of 5...6 next record, 4 is previous record
Thanks,
Ed
Hi Ed!
This is impossible to implement your issue using DI-RecordSet object, but as an option i could suggest you to implement it by stored procedure (T-SQL query) and execute it by DoQuery().
To do it you have to:
- be able to get the last viewed record by code (or T-SQL)
- use IDENTITY function to build an order you want
- use UNION operator to get <i>5,6,7,8,9,1,2,3,4</i> instead of <i>1,2,3,4,5,6,7,8,9</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the reply.
I will be busy implementing the concept. While I fully understand your suggestions as a soultion, I have never has the opportunity to utilize this scenario. So, I may be asking another question if you do not mind.
Thanks,
EJD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.