S
SK
Using FP 2003 I continue to get the following error from the DRW if I add
need to a parameter to a custom query using sum:
Database Results Wizard Error
Your page contains a query with user input parameters that could not be
resolved.
This could happen if your DatabaseRegionStart webbot has an empty or missing
s-columnnames or s-columntypes attributes.
You may need to read Microsoft Knowledge Base Article 817029.
fp_sQry="select Company, sum(labor) as LABOR, sum(other) as OTHER,
sum(funded_override) as OVER_RIDE, sum(due_sub) as DUE_SUB from do_sub_tos
where do_num = :O_NUM:: group by do_num, company order by company"
fp_sDefault="DO_NUM="
fp_sNoRecords="<tr><td colspan=5 align=""LEFT"" width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Company=200&LABOR=6&OTHER=6&OVER_RIDE=6&DUE_SUB=6&"
fp_iDisplayCols=5
fp_fCustomQuery=True
BOTID=3
fp_iRegion=BOTID
This MS article is bogus. This should work.
I can get the query to work if I take out "where do_num = :O_NUM::" to
make it:
select Company, sum(labor) as LABOR, sum(other) as OTHER,
sum(funded_override) as OVER_RIDE, sum(due_sub) as DUE_SUB from do_sub_tos
group by do_num, company order by company
but of course the information I want is not displayed.
I thought adding DO_NUM to the select columns would help, but it does not.
===========================================================================
I have gotten the error before on a different page, but made it work in the
following way by adding a false column and hiding it:
fp_sQry="SELECT ' ' as DO_NUM, sum(labor) as SUM_LABOR, sum(TRAVEL) as
SUM_TRAVEL, SUM(other) as SUM_OTHER, SUM(FUNDED) as SUM_FUNDED from
do_details where DO_NUM = :O_NUM::"
fp_sDefault="DO_NUM="
fp_sNoRecords="No records returned."
fp_sDataConn="Database1"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&DO_NUM=200&SUM_LABOR=6&SUM_TRAVEL=6&SUM_OTHER=6&SUM_FUNDED=6&
"
fp_iDisplayCols=5
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
============================================================================
====
If anyone (Microsoft) knows a fix for this I would really appreciate it.
The DRW is really of limited value if one can't make select statements work
with 'distinct', 'sum', 'count' and a form parameter.
Thanks for any help.
Sue
need to a parameter to a custom query using sum:
Database Results Wizard Error
Your page contains a query with user input parameters that could not be
resolved.
This could happen if your DatabaseRegionStart webbot has an empty or missing
s-columnnames or s-columntypes attributes.
You may need to read Microsoft Knowledge Base Article 817029.
fp_sQry="select Company, sum(labor) as LABOR, sum(other) as OTHER,
sum(funded_override) as OVER_RIDE, sum(due_sub) as DUE_SUB from do_sub_tos
where do_num = :O_NUM:: group by do_num, company order by company"
fp_sDefault="DO_NUM="
fp_sNoRecords="<tr><td colspan=5 align=""LEFT"" width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&Company=200&LABOR=6&OTHER=6&OVER_RIDE=6&DUE_SUB=6&"
fp_iDisplayCols=5
fp_fCustomQuery=True
BOTID=3
fp_iRegion=BOTID
This MS article is bogus. This should work.
I can get the query to work if I take out "where do_num = :O_NUM::" to
make it:
select Company, sum(labor) as LABOR, sum(other) as OTHER,
sum(funded_override) as OVER_RIDE, sum(due_sub) as DUE_SUB from do_sub_tos
group by do_num, company order by company
but of course the information I want is not displayed.
I thought adding DO_NUM to the select columns would help, but it does not.
===========================================================================
I have gotten the error before on a different page, but made it work in the
following way by adding a false column and hiding it:
fp_sQry="SELECT ' ' as DO_NUM, sum(labor) as SUM_LABOR, sum(TRAVEL) as
SUM_TRAVEL, SUM(other) as SUM_OTHER, SUM(FUNDED) as SUM_FUNDED from
do_details where DO_NUM = :O_NUM::"
fp_sDefault="DO_NUM="
fp_sNoRecords="No records returned."
fp_sDataConn="Database1"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&DO_NUM=200&SUM_LABOR=6&SUM_TRAVEL=6&SUM_OTHER=6&SUM_FUNDED=6&
"
fp_iDisplayCols=5
fp_fCustomQuery=True
BOTID=1
fp_iRegion=BOTID
============================================================================
====
If anyone (Microsoft) knows a fix for this I would really appreciate it.
The DRW is really of limited value if one can't make select statements work
with 'distinct', 'sum', 'count' and a form parameter.
Thanks for any help.
Sue