[Zope] SQL Errors !!

Jim Sanford jsanford@atinucleus.com
Tue, 5 Oct 1999 12:28:27 -0500


This is a case where I think you need to use <dtml-var name="name">
or <!--#var name="Name"-->

__________________________________________________________________

             Jim Sanford
     ^       Database Engineer
    ^ ^  ^   Accelerated Technology, Inc.
   ^   ^     720 Oak Circle Drive East
  ^  ^  ^    Mobile, AL 36609
 ^ ^     ^   Voice: 334-661-5770  fax: 334-661-5788
^         ^  E-Mail: jsanford@atinucleus.com
             Web: http://www.atinucleus.com
 
Source Code, No Royalties, Any CPU...It just make sense !
__________________________________________________________________
-----Original Message-----
From: Joshi, Sunit <sjoshi@ingr.com>
To: zope@zope.org <zope@zope.org>
Date: Tuesday, October 05, 1999 12:10 PM
Subject: [Zope] SQL Errors !!


Hello All

First of all thanks for replying to my earlier mail where I'm trying
to use the SQL method:
select ta.Name as Name, tb.DeptNo as DeptNo, tb.Title as Title,
tb.Salary as Salary
from tblFacts ta, tblEmployee tb
where ta.EmployeeID = tb.EmployeeID
order by DeptNo

The SQL runs fine when tested in Zope, however when used in a DTML
doc, I get this
error message
Error Type: KeyError
Error Value: Name

This is my DTML doc

<table border="1">
  <tr>
    <th align="center"><strong>Name</strong></th>
    <th align="center"><strong>Department</strong></th>
    <th align="center"><strong>Title</strong></th>
    <th align="center"><strong>Current Salary</strong></th>
  </tr> 

<--#in sqlShowEmployees--> 
  <tr>
    <td><!--#var Name--></td>
    <td><!--#var DeptNo--></td>
    <td><!--#var Title--></td>
    <td><!--#if expr="Salary > 45000"-->
        <font color="FF0000">
        <center>$<!--#var Salary--></center>
      </font>
      <!--#else-->
        <center>$<!--#var Salary--></center>
      <!--#/if-->
    </td>
  </tr>

<--#/in--> 
</table>

Any ideas..???
thanks
Sunit

_______________________________________________
Zope maillist  -  Zope@zope.org
http://www.zope.org/mailman/listinfo/zope

(Related lists - please, no cross posts or HTML encoding!

To receive general Zope announcements, see:
http://www.zope.org/mailman/listinfo/zope-announce

For developer-specific issues, zope-dev@zope.org -
http://www.zope.org/mailman/listinfo/zope-dev )