|
-
Jun 28th, 2019, 02:06 AM
#1
Thread Starter
Addicted Member
ADODB.RecordSet lists only the last few rows after deletion and adding new rows?
I have a table which has 40000 rows. I need to take all of them and run check on one particular column(filed).
I am fetching them inside a RecordSet and after I run the check, the ones which contain wrong value are copied into a separate local table inside Access 2000 environment.
Lets call this table WrongPersonID.
So I am running first, clear(DELETE all rows) the table WrongPersonID, Add(INSERT) on all those records which contain wrong preson ID, and then fetch(SELECT a page) a portion of the records in WrongPersonID into a DataGridView.
It works all well the first try. I can browse the wrong IDs with paging, i.e take first 25 rows, then next 25 rows, etc...
However, if I run all these steps again, clear table WrongPersonID, find all wrong records and add them to WrongPersonID, and then SELECT first page(25 rows), it doesn't work, I don't see the first page fetched in the DataGridView. The strange thing is, this code is fetching only the last page, so I can see the last page in my DataGridView.
As if somehow the "row pointer" points to the last part of WrongPersonID so that's why I see the last page only.
Can somebody tell me what is going on?
Also, can somebody tell me what sort of query do I send to ADODB.RecordSet to open it for inserting data? I send a "SELECT" query, but for inserting is it the most appropriate?
The code is working. I can put code snippet, but it would be too large to cover all those steps.
EDIT:
Tried MoveFirst() but get this error:
Code:
MoveFirst(): Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
Last edited by kutlesh; Jun 28th, 2019 at 02:20 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|