[Zope] SQL to Excel Redux

Bruce Dykes Bruce Dykes" <bkd@graphnet.com
Mon, 6 May 2002 09:45:32 -0400


----- Original Message -----
From: "Bruce Dykes" <bkd@graphnet.com>
To: <zope@zope.org>
Sent: Monday, May 06, 2002 07:02
Subject: Re: [Zope] SQL to Excel


> I was getting SQL syntax errors, but my personal entropy field seems to
have
> abated, and it's working fine now. One possible difference is that I was
> using the test tab of the ODBC connection page instead of testing from the
Z
> SQL method.

The SQL works. I know this from the test tab of the Z SQL object I created.

So now to build a page from the query. I adapted this bit of code from the
Zope Bible:

<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>
<tr><td>Company
Name</td><td>TechName1</td><td>TechName3</td><td>Contact</td><td>First
Name</td><td>Contact</td><td>Last
Name</td><td>Company/Department</td><td>Contact</td><td>Title</td><td>Phone
Number</td><td>PHONENUMBER2</td><td>PhoneNumber3</td><td>Fax
Number</td><td>Notes</td><td>Rtenum</td><td>ShortName</td></tr>
<dtml_in carrier_list>
  <tr>
  <td><dtml_var Company_Name></td>
  <td><dtml_var TechName1></td>
  <td><dtml_var TechName3></td>
  <td><dtml_var Contact></td>
  <td><dtml_var First_Name></td>
  <td><dtml_var Contact></td>
  <td><dtml_var Last_Name></td>
  <td><dtml_var Company_Department></td>
  <td><dtml_var Contact2></td>
  <td><dtml_var Title></td>
  <td><dtml_var Phone_Number></td>
  <td><dtml_var PHONENUMBER2></td>
  <td><dtml_var PhoneNumber3></td>
  <td><dtml_var Fax_Number></td>
  <td><dtml_var Notes></td>
  <td><dtml_var Rtenum></td>
  <td><dtml_var ShortName></td>
  </tr>
</dtml_in>
</table>

<dtml-var standard_html_footer>

I took all the table head names from the results of the SQL test, as well
the dtml_var's. But the dtml_var's aren't being rendered out...is there a
place I need to declare them, such as in the carrier_list SQL method?

Here's the carrier_list SQL method: select * from [Contacts$]

Everything, the ODBC connection, the SQL method, and the DTML page method
are all in the same folder.

thanks again
bkd