[Zope-DB] KeyError for DTML Method accessing
Adam Getchell
AdamG@hrrm.ucdavis.edu
Thu, 17 Jul 2003 13:55:26 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I'm developing an application which lists current job openings.
I have a view created on our MSSQL server that has the following
columns: postdate, vlnum, wrktitle, title, minmonthly, maxmonthly,
ffd. I created and tested a Zope ODBC connector called
ODBC_SQLDEVEL_HR which successfully connects to this view.
I then created a Z SQL Method called searchInterimEOB, with a
connection ID of ODBC_SQLDEVEL_HR, and no arguments, with the
following SQL:
select * from InterimEOB ORDER BY category, postdate DESC
This statement returns all of the rows that I want. The form I want
to create should just list the contents of this query.
I then created a DTML Method called EOBList with the following:
<dtml-var standard_html_header>
<h2><dtml-var title_or_id> <dtml-var document_title></h2>
<p>
This is the <dtml-var document_id> Document
in the <dtml-var title_and_id> Folder.
</p>
<table width="100%" border=2>
<dtml-in "searchInterimEOB">
<tr>
<td><dtml-var postdate></td>
<td><dtml-var vlnum></td>
<td><dtml-var wrktitle></td>
<td><dtml-var title></td>
<td><dtml-var minmonthly> - </td>
<td><dtml-var maxmonthly></td>
<td>Final Filing Date: <dtml-var ffd></td>
</dtml-in>
</table>
<dtml-var standard_html_footer>
However, doing a view of this generates the following error:
Page Error
An an error occurred while publishing this resource.
Error Type: KeyError
Error Value: 0
Troubleshooting Suggestions
* This resource may be trying to reference a nonexistent object
or variable 0.
* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an
error.
It seems I don't have a variable set. Can you shed any light?
***************************
* Adam Getchell AdamG@hrrm.ucdavis.edu
* System Architect/Programmer (530) 752-1584
* Human Resources Information Systems http://www.hr.ucdavis.edu/
***************************
"Invincibility is in oneself, vulnerability in the opponent." -- Sun
Tzu
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
iQA/AwUBPxcNPo68FtGOL2f4EQKYHQCfSPhfZXyf9eybj6fG1FFMcfXNWIwAoIfG
UJN/wzv7bSsbgQs/GmpGXO7K
=DbfK
-----END PGP SIGNATURE-----