[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 115
  • Last Modified:

Getting next record in sql server db

Lets say I have x records in my recordset.  I write those to an array and "use" those and then more are added.  II don't know how many more were added.  I want to go back to where I left off and grab just the new records.  I did create a marker like this:

iLastRcd = rs.RecordCount

How do I re-open the recordset from there without missing any new records and without grabbing any existing records.

Here is the sql query that I am using:
sql = "SELECT Bib, Chip, Time, Reader, Antenna FROM RawRFID WHERE EventID = " & lEventID

Thank you.
0
Bob Schneider
Asked:
Bob Schneider
1 Solution
 
ste5anSenior DeveloperCommented:
Please rephrase your question and describe your actual problem.

When you "reopen" a recordset new rows may be added at any position in the recordset. So a simple marker don't work.

The only solution is to store a candidate key of the read records, so that you can skip them in the second run.
0
 
Bob SchneiderCo-OwnerAuthor Commented:
Thanks.  I think I got it figured out.  I appreciate the help.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now