[Zope-DB] KeyError for DTML Method accessing

Adam Getchell AdamG@hrrm.ucdavis.edu
Thu, 17 Jul 2003 17:27:12 -0700


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The fix was:

<dtml-in "searchInterimEOB()">

> -----Original Message-----
> From: Adam Getchell [mailto:AdamG@hrrm.ucdavis.edu] 
> Sent: Thursday, July 17, 2003 1:55 PM
> To: 'zope-db@zope.org'
> Subject: [Zope-DB] KeyError for DTML Method accessing
> 
> 
> 
> *** PGP Signature Status: good
> *** Signer: Adam Getchell <AdamG@hrrm.ucdavis.edu> 
> *** Signed: 7/17/2003 1:55:26 PM
> *** Verified: 7/17/2003 5:26:21 PM
> *** BEGIN PGP VERIFIED MESSAGE ***
> 
> 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
> 
> 
> 
> *** END PGP VERIFIED MESSAGE ***
> 
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db
> 

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBPxc+4I68FtGOL2f4EQKEwACdG8M6jFX6sNKnuI430JY2Hti1QawAn25E
n+i6Ra0Qqwtzp0yrcjHshyDu
=Tp5L
-----END PGP SIGNATURE-----