|
This has nothing to do with you problem, but don't forget to close your
<TR> tags.
I would check to see that your result set has more then one record (I know
you said you tried the SQL but wouldn't hurt to check what net.data is
getting). maybe display the whole table variable to debug, and then take it
from there.
Robert
|---------+---------------------------->
| | jlowary@saltonusa|
| | .com |
| | Sent by: |
| | web400-bounces@mi|
| | drange.com |
| | |
| | |
| | 08/10/2007 02:40 |
| | PM |
| | Please respond to|
| | Web Enabling the |
| | AS400 / iSeries |
|---------+---------------------------->
>-------------------------------------------------------------------------------------------------------------------|
| |
| To: web400@xxxxxxxxxxxx |
| cc: |
| Subject: [WEB400] Question on %FUNCTION(DTW_SQL) |
>-------------------------------------------------------------------------------------------------------------------|
I'm just starting into the Net.Data world and trying to take other working
examples here and make a version of them work with order management
software we have that runs a web-store on-line. This macro seems to work
fine except it will 25 out of 30 times only display one record out of the
file I'm running the SQL over. I've check the file via STRSQL and run the
same SQL interactively (substituting a Product Category for the field) and
get more that one record.
Below is what I have as a macro that is getting called from a webpage via
this statement:
<form method="POST"
action="/cgi-bin/$(handle)/mac/FindManual.mac/byBrand">
....
</form>
it displays a page just fine only has (most of the time) one entry in the
table I'm building.
I don't know why it would work sometimes and not others, and I haven't a
clue where to start looking. If anyone can give me some pointers I'd
appreciate it.
Thanks for your help!
Jim Lowary
System Analyst, Salton Inc.
(573) 447-5500
From: FindManual.mac
%DEFINE {
DATABASE = "*LOCAL"
DB_CASE="UPPER"
%}
@DTW_STATIC()
%define handle = ""
@DTW_RTVHANDLE(handle)
%MESSAGE {
100: "No entries found that matched selection criteria.": continue
%}
%FUNCTION(DTW_SQL) sql1(productCategoryId) {
select IVITEM, IVIDSC, IVPRGR
from LINVNT01
where IVPRGR = '$(productCategoryId)' for fetch only
%REPORT {
@DTW_ASSIGN(N1, " Manual ")
@DTW_ASSIGN(N2, " Description ")
<TABLE BORDER="0" cellpadding="5">
<TR>
<TH align="left">$(N1)</TH>
<TH align="left">$(N2)</TH>
%ROW {
<TR>
<TD><a href="$(imgPath)/Use_Care/$(V1).pdf"> $(V1)</a></TD>
<TD>$(V2)</TD>
%}
</TABLE>
%}
%}
%HTML(byBrand) {
@DTW_ACCEPT(handle)
%INCLUDE "/HTI/Top_Bann.hti"
<BR>
<center>
@sql1(productCategoryId)
</center>
<BR>
<TABLE BORDER="0" cellpadding="5">
<TR>
<TD width=85%>
</TD>
<TD align=left width=15%>
<a href="$(templateLink)Manuals.html"><img align="middle" border="0"
src="$(imgPath)btn_search.gif"> Search Again</a>
</TD>
</TR>
</TABLE>
%INCLUDE "/HTI/Bot_Bann.hti"
%}
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.