This content has been marked as final. Show 3 replies
I think there is some redundancy in the variables startrow, pagestop, maxrows, block and rowcount, and that the redundancy makes the logic unclear. For example, the statement StartRow = MaxRows * StartRow + 1 doesn't make sense.
Is the code I give below of any help? In any case, I would advise you do everything on a single page, rather than redirect. You don't have to read the tag every time, do you?
You have your query inside a loop. It might be more efficient to put the loop inside the query. You have to actually try it and compare to be sure. The syntax is:
insert into yourtable
(field1, field2, etc)
select distinct value1, value2, etc
<cfif you are not finished your loop>
I also agree with BKBK about doing everything on one page. The extra complications of breaking it up does not seem to provide any benefits.
Thanks for your help, Ill give these a shot and report back, I agree it should all be done on one page but the hosting company said I should brake it up because that could be what was causing the time out, the spreadsheet im uploading has about 65,000 records so it just kept hitting a wall.