You're getting this error because TOTAL_ROWS isn't set. The fix is to make sure that a query is executed before you call this function. Another example of doing this can be found at
http://www.ignite400.org/html/macro_examples.htm (search for START_ROW). You have to be registered on that site to download the samples. This site is pretty much dead but there's quite a bit of Net.Data info in the mailing list and forum archives.
Matt
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Peter Vidal
Sent: Tuesday, April 22, 2008 4:14 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Doing subfiles in Net.Data
Hi list!
I am using (
http://www.web400.com/download/NDSubfile/NDSubfile.html) to
simulate a subfile. I am using EXACTLY the same code that appears here
and for some reason I am having the following error:
NET.DATA Error: Function call to DTW_RINTDIV failed. Error Number is 4001.
If you go to the source
(
http://www.web400.com/download/NDSubfile/startrow.txt) this can be found
on this area (is also found in
http://archive.midrange.com/web400/200210/msg00138.html):
%{---------------------------------------------------------%}
%{ Section D - calculate/display total number of pages to %}
%{ generate (whole and fractional) %}
%{---------------------------------------------------------%}
@dtw_assign(totalPages, @dtw_rintdiv(TOTAL_ROWS, RPT_MAX_ROWS))
The values before executing the function are:
$totalPages = 0
TOTAL_ROWS =
RPT_MAX_ROWS = 10
At this point of the CGI, I have not get into the SQL function. The error
appears long before. (See the source for more information).
Has anybody used this logic before? If so, what am I doing wrong?
TIA,
PETER VIDAL
MAPICS IT TECHNICAL SUPPORT TEAM / SR SYSTEM ANALYST
10540 Ridge Rd., Suite 203, New Port Richey, FL 34654-5111
Tel:727-849-9999, x2414 Fax:727-815-3120
WWW.PALL.COM
"The secret of joy in work is contained in one word - excellence. To know
how to do something well is to enjoy it."
Pearl Buck (1892-1973), The Joy of Children, 1964
--------------------------------------------------------------------------------
Attention:
This communication may contain information that is confidential,
privileged and/or exempt from disclosure under applicable law.
If you are not the intended recipient, please notify the sender
immediately and delete the original, all attachments, and all
copies of this communication.
--------------------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.