Have you tried structuring your query so that it only looks for distinct
results?  I don't know about other databases, but with Oracle, using
DISTINCT in the query makes it so any duplicate rows are suppressed.  That
way, you don't have to worry about custom code.

-- Grace

Rimma <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hello my Forum Pals!
>
> In my application, I have the Repeated Object  which has 4 rows displayed
from the
> database.  However, the first row is often repeated and therefore, when it
repeats itself,
> I want to make sure that it's skipped.
>
> The way I wrote my code right now, it displays the first row in the first
record and doesn't
> display any following first row.  I have to mention this first row has its
own table,
> "Businesses", however, in that particular query, it's taken from another
table
> "textArticles"  (just in case it helps).
>
> Here's the code that I'm using.  Does anybody have any suggestions?  What
should I
> change?
>
> file://[[SPIDER_EVENT<this_onBeforeDisplayEvent>
> public int this_onBeforeDisplayEvent(CSpDisplayEvent event)
> {
>
> CSpValue date = CSpider.getUserSessionObject("sesDate");
>
> CSpSelect doViewResults = (CSpSelect) CSpider.getDataObject
("doViewResults");
> doViewResults.clearDynamicCriteria ();
> doViewResults.addDynamicCriterion ("textArticles_Date",
CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATOR, date);
> doViewResults.execute ();
>
> return (PROCEED);
> }
> file://]]SPIDER_EVENT<this_onBeforeDisplayEvent>
> file://[[SPIDER_EVENT<Repeated1_onBeforeRowDisplayEvent>
> public int Repeated1_onBeforeRowDisplayEvent(CSpDataDrivenVisualEvent
event)
> {
> CSpider.putUserSessionObject("sesRowIndex", (CSpValue) new
CSpInteger(event.getRowIndex()));
> return (PROCEED);
> }
> file://]]SPIDER_EVENT<Repeated1_onBeforeRowDisplayEvent>
>
> file://[[SPIDER_EVENT<cbBusinesses_onBeforeDisplayEvent>
> public int cbBusinesses_onBeforeDisplayEvent(CSpDisplayEvent event)
> {
> if (((CSpInteger) CSpider.getUserSessionObject("sesRowIndex")).intValue()
== 0) {
> return (PROCEED);
> }
> else {
> return (SKIP);
> }
> }
> file://]]SPIDER_EVENT<cbBusinesses_onBeforeDisplayEvent>
>
> Thanks a lot in advance,
> Rimma
>
> _________________________________________________________________________
>
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
> For dire need help, email: [EMAIL PROTECTED]
>


_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to