
02-05-2004, 10:32 PM
|
 |
Village VB Idiot
* Expert *
|
|
Join Date: Jan 2003
Location: Idaho
Posts: 1,850
|
|
|
I've run into this problem before, and I haven't found an easy solution.
I don't know what Database engine you're using, but if you're using SQL Server, you can try this little trick:
1) In the Stored Procedure, rather than returning all those records, populate them into a temporary table that has a separate identity field.
2) In your code, build a query that uses TOP to return only the first x rows from the temporary table, then do what you need to with those records.
3) Find the value of the last record returned, and write a DELETE query that kills every record before that one.
4) Repeat steps 2 and 3 until you run out of rows to process.
I know that it seems a little clunky, but I've actually used this technique successfully.
|
|