🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19817

Re: Database Driven Catalog - ???

#19817
From: maxdunn
Date: Fri, 15 Nov 2002 22:39
12 lines
1756 bytes
In the example that I had done, I added the page outside of the SetupPage function then passed the page object to the SetupPage function. 

Of course there are many ways you could do this. Probably as you are adding a page already in the SetupPage function, just add the page in that function, don't pass any arguments to it at all. So change it to just: 
Public Function SetupPage() 

and call it like 
SetupPage 

You want to call it whenever you have output 16 records. You could count records and test for iRecCount Mod 16 = 0 or you could do something like what you're doing, just make sure that it happens after the 16th, 32nd, etc. records. 

I am confused at the way you're iterating through records. I would tend to have rs.movenext right before the Loop, and really just the single Do While Loop rather than loops within loops. It can get you in trouble to put rs.movenext anywhere but within a loop that starts: 
Do While Not.Rs.Eof because you could otherwise hit the end of the recordset.
Technical Details
Message-ID: <1de69529.22@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newsfeed.online.be!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de69529.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,4348409c0a586298
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-11-15 15:28:05 PST
From: maxdunn <maxdunn@siliconpublishing.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newsfeed.online.be!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Database Driven Catalog - ???
Message-ID: <1de69529.22@WebX.la2eafNXanI>
Date: Fri, 15 Nov 2002 14:39:22 -0800
References: <1de69529.-1@WebX.la2eafNXanI>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit