Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Unsattisfied with reports re-retrieving for each page.

6 posts in General Discussion (old) Last posting was on 2000-03-23 15:54:09.0Z
Jamie White Posted on 2000-03-22 16:02:46.0Z
Newsgroups: sybase.public.easerver
From: "Jamie White" <jwhite@naroyal.com>
Subject: Unsattisfied with reports re-retrieving for each page.
Date: Wed, 22 Mar 2000 11:02:46 -0500
Lines: 38
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 199.79.243.60
Message-ID: <347_l37GtgBl$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25930
Article PK: 155957

I've setup a datawindow with Previous Page and Next Page buttons, and I've
followed the code examples in B.O.L. It seems very ineffiecent that the
HTML datawindow should re-retrieve the data each time a Next or Previous
button is clicked. I think after it is retrieved the selfLink args then
tell the HTML Datawindow what page to generate HTML for. I'm looking for
alternatives to this problem.

I'm actually using MTS to host PowerBuilder components and accessing them
with ASP/VB Script. (I know this is the EAServer group, but I'm unsure
where else I can find the expertise I need.) These are a couple options I'm
toying with and I was wondering if anyone could offer advice.

1. Instead of creating the HTMLDatawindow local to the page, create it as a
session variable. This way after the first retrieve it should retain the
data, and I would only need to apply the selfLink arguments. The downside
of this is that session variables are such resource hogs.

2. Create an HTMLDatawindow manager as an application variable. This would
be a powerbuilder component (I think a factory type object?). Each report
page would register with it and then be given a new HTMLDatawindow reference
or an HTMLDatawindow that had already been retrieved. Still would be a
memory hog, becuase the pages would not unregister until the session ended.

3. Have the report stored_procedures post results into database tables.
The datawindow objects would then just be 'select' statements against those
tables. The database tables would require a feild that stored the users
Session Id. Overly complex? Each report page would require a stored
procedure call to the database followed by a create of the HTML Datawindow.

Setup: PB 7.0, MS SQL Server 7.0, IIS 4.0, MTS 2.0
Note: This will be a low volume site. We only have 50 customers and 150
potential customers.

Thanks,
Jamie White


Tim Nesham Posted on 2000-03-22 16:42:34.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: Unsattisfied with reports re-retrieving for each page.
Date: Wed, 22 Mar 2000 10:42:34 -0600
Lines: 66
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38d8f7fe@news.qgraph.com>
References: <347_l37GtgBl$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:25920
Article PK: 155947

Can you retrieve all rows by setting page count to 0? So don't limit the
number of rows in a page? Then get rid of the page buttons.
If you have 10 rows in the client page and 100 rows on the server, it
doesn't matter what you use, you'll have to refresh the page to get the next
10 rows. That's HTML.

One trick, if the result set is not prohibitively large, is to retrieve all
rows back and place a Scrollable DIV block around the HTMLDW source. An
IE4-5 solution.

Also, the HTMLDW does not reretrive the same rows unless there are no more
rows to retrieve. But it doesn't necessarily know this in the client page
unless you add some client script. The client script could cancel the page
request if it knows that there are no more pages.
We put "Page x of xxx" in the footer to indicate what page the user is on.
If it says "Page 1 of 1" then the user does not need to hit the page button.

"Jamie White" <jwhite@naroyal.com> wrote in message
news:l37GtgBl$GA.298@forums.sybase.com...
> I've setup a datawindow with Previous Page and Next Page buttons, and I've
> followed the code examples in B.O.L. It seems very ineffiecent that the
> HTML datawindow should re-retrieve the data each time a Next or Previous
> button is clicked. I think after it is retrieved the selfLink args then
> tell the HTML Datawindow what page to generate HTML for. I'm looking for
> alternatives to this problem.
>
> I'm actually using MTS to host PowerBuilder components and accessing them
> with ASP/VB Script. (I know this is the EAServer group, but I'm unsure
> where else I can find the expertise I need.) These are a couple options
I'm
> toying with and I was wondering if anyone could offer advice.
>
> 1. Instead of creating the HTMLDatawindow local to the page, create it as
a
> session variable. This way after the first retrieve it should retain the
> data, and I would only need to apply the selfLink arguments. The downside
> of this is that session variables are such resource hogs.
>
> 2. Create an HTMLDatawindow manager as an application variable. This
would
> be a powerbuilder component (I think a factory type object?). Each report
> page would register with it and then be given a new HTMLDatawindow
reference
> or an HTMLDatawindow that had already been retrieved. Still would be a
> memory hog, becuase the pages would not unregister until the session
ended.
>
> 3. Have the report stored_procedures post results into database tables.
> The datawindow objects would then just be 'select' statements against
those
> tables. The database tables would require a feild that stored the users
> Session Id. Overly complex? Each report page would require a stored
> procedure call to the database followed by a create of the HTML
Datawindow.
>
> Setup: PB 7.0, MS SQL Server 7.0, IIS 4.0, MTS 2.0
> Note: This will be a low volume site. We only have 50 customers and 150
> potential customers.
>
> Thanks,
> Jamie White
>
>
>


Jamie White Posted on 2000-03-22 18:34:14.0Z
Newsgroups: sybase.public.easerver
From: "Jamie White" <jwhite@naroyal.com>
Subject: Re: Unsattisfied with reports re-retrieving for each page.
Date: Wed, 22 Mar 2000 13:34:14 -0500
Lines: 62
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 199.79.243.60
Message-ID: <347_tTiMV1Cl$GA.201@forums.sybase.com>
References: <347_l37GtgBl$GA.298@forums.sybase.com> <347_38d8f7fe@news.qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25906
Article PK: 155933

Hey Tim,

Thanks for the feedback, but I had a couple comments and clarifications
below.

The reports that I will be running are stored procedures and generally take
a minute or two in a 2-tier client-server application.

Tim Nesham wrote in message <38d8f7fe@news.qgraph.com>...
>Can you retrieve all rows by setting page count to 0? So don't limit the
>number of rows in a page? Then get rid of the page buttons.
>If you have 10 rows in the client page and 100 rows on the server, it
>doesn't matter what you use, you'll have to refresh the page to get the
next
>10 rows. That's HTML.

This is looking like what I will need to do. I'll basically need a
statefull server component that remembers the rows retrieved. Here's what
I'm doing now. Create the HTMLdw as a session variable. Then in the script
if it's already created I skip the retrieve and go staight to SetAction() &
Generate(). Unfortunately, I'm getting -5 errors. Eventually I will wrap
this up in a PB com object so that our ASP code isn't so complicated or
duplicated!

>One trick, if the result set is not prohibitively large, is to retrieve all
>rows back and place a Scrollable DIV block around the HTMLDW source. An
>IE4-5 solution.

I like this!

>Also, the HTMLDW does not reretrive the same rows unless there are no more
>rows to retrieve. But it doesn't necessarily know this in the client page
>unless you add some client script. The client script could cancel the page
>request if it knows that there are no more pages.
>We put "Page x of xxx" in the footer to indicate what page the user is on.
>If it says "Page 1 of 1" then the user does not need to hit the page
button.

I might be misunderstanding the HTMLdw here. I've been running SQL Traces
and each time the page is refreshed the original query is called, so I think
it is retrieving the same rows each time from the database. But the
setAction code is telling the HTMLdw to only generate HTML for the current
page.


Jamie



>"Jamie White" <jwhite@naroyal.com> wrote in message
>news:l37GtgBl$GA.298@forums.sybase.com...
>> I've setup a datawindow with Previous Page and Next Page buttons, and
I've
>> followed the code examples in B.O.L. It seems very ineffiecent that the
>> HTML datawindow should re-retrieve the data each time a Next or Previous
>> button is clicked. I think after it is retrieved the selfLink args then
>> tell the HTML Datawindow what page to generate HTML for. I'm looking for
>> alternatives to this problem.
>>....


Tim Nesham Posted on 2000-03-22 20:09:50.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: Unsattisfied with reports re-retrieving for each page.
Date: Wed, 22 Mar 2000 14:09:50 -0600
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38d92892@news.qgraph.com>
References: <347_l37GtgBl$GA.298@forums.sybase.com> <347_38d8f7fe@news.qgraph.com> <347_tTiMV1Cl$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:25900
Article PK: 154354


> I might be misunderstanding the HTMLdw here. I've been running SQL Traces
> and each time the page is refreshed the original query is called, so I
think
> it is retrieving the same rows each time from the database. But the
> setAction code is telling the HTMLdw to only generate HTML for the current
> page.

The HTMLDW has the result set on Jaguar and the pagenext does not
re-retrieve from the database. This is my experience. If the SetSelfLink
stuff is not set right it might indeed hit the database again with the same
query for each page refresh. Are you using the DTC or doing it purely in
script? Check Larry Cermack's articles on SDN.Sybase.com for examles using
the HTMLDW without the DTC which I feel gives a finer control.

HTH,
Tim


Jamie White Posted on 2000-03-23 15:54:09.0Z
Newsgroups: sybase.public.easerver
From: "Jamie White" <jwhite@naroyal.com>
Subject: Re: Unsattisfied with reports re-retrieving for each page.
Date: Thu, 23 Mar 2000 10:54:09 -0500
Lines: 33
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 199.79.243.60
Message-ID: <347_t$ikYAOl$GA.111@forums.sybase.com>
References: <347_l37GtgBl$GA.298@forums.sybase.com> <347_38d8f7fe@news.qgraph.com> <347_tTiMV1Cl$GA.201@forums.sybase.com> <347_38d92892@news.qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25829
Article PK: 154349

Tim,

Thanks for the help and the advice on checking out Larry's articles.

Once I started going through the HTML DW source code I found the function
"setServerSideState" which allows the dw to keep it's rows between pages.
This solved my problem.

Jamie

Tim Nesham wrote in message <38d92892@news.qgraph.com>...
>> I might be misunderstanding the HTMLdw here. I've been running SQL
Traces
>> and each time the page is refreshed the original query is called, so I
>think
>> it is retrieving the same rows each time from the database. But the
>> setAction code is telling the HTMLdw to only generate HTML for the
current
>> page.
>
>The HTMLDW has the result set on Jaguar and the pagenext does not
>re-retrieve from the database. This is my experience. If the SetSelfLink
>stuff is not set right it might indeed hit the database again with the same
>query for each page refresh. Are you using the DTC or doing it purely in
>script? Check Larry Cermack's articles on SDN.Sybase.com for examles using
>the HTMLDW without the DTC which I feel gives a finer control.
>
>HTH,
>Tim
>
>


Larry Cermak[Team Sybase] Posted on 2000-03-22 16:21:18.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: Unsattisfied with reports re-retrieving for each page.
Date: Wed, 22 Mar 2000 10:21:18 -0600
Lines: 63
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: node6.dhcpchi.dslspeed.zyan.com 208.41.199.6
Message-ID: <347_bGrjcwBl$GA.202@forums.sybase.com>
References: <347_l37GtgBl$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25924
Article PK: 155952

You can tell the HTMLGenerator to be stateful, which will make it "hang
around" and not re-retrieve. However, what I would suggest, if you have
large reports, is to create your own stateful component to store the data
and manage pulling off rows as you need them.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Jamie White" <jwhite@naroyal.com> wrote in message
news:l37GtgBl$GA.298@forums.sybase.com...
> I've setup a datawindow with Previous Page and Next Page buttons, and I've
> followed the code examples in B.O.L. It seems very ineffiecent that the
> HTML datawindow should re-retrieve the data each time a Next or Previous
> button is clicked. I think after it is retrieved the selfLink args then
> tell the HTML Datawindow what page to generate HTML for. I'm looking for
> alternatives to this problem.
>
> I'm actually using MTS to host PowerBuilder components and accessing them
> with ASP/VB Script. (I know this is the EAServer group, but I'm unsure
> where else I can find the expertise I need.) These are a couple options
I'm
> toying with and I was wondering if anyone could offer advice.
>
> 1. Instead of creating the HTMLDatawindow local to the page, create it as
a
> session variable. This way after the first retrieve it should retain the
> data, and I would only need to apply the selfLink arguments. The downside
> of this is that session variables are such resource hogs.
>
> 2. Create an HTMLDatawindow manager as an application variable. This
would
> be a powerbuilder component (I think a factory type object?). Each report
> page would register with it and then be given a new HTMLDatawindow
reference
> or an HTMLDatawindow that had already been retrieved. Still would be a
> memory hog, becuase the pages would not unregister until the session
ended.
>
> 3. Have the report stored_procedures post results into database tables.
> The datawindow objects would then just be 'select' statements against
those
> tables. The database tables would require a feild that stored the users
> Session Id. Overly complex? Each report page would require a stored
> procedure call to the database followed by a create of the HTML
Datawindow.
>
> Setup: PB 7.0, MS SQL Server 7.0, IIS 4.0, MTS 2.0
> Note: This will be a low volume site. We only have 50 customers and 150
> potential customers.
>
> Thanks,
> Jamie White
>
>
>