Re: [Zope] ODBC - 1 step forward - woops I tripped
From: rgines@purina.com <rgines@purina.com> <dtml-excerpt>
My client runs IBMs' UDB 5 database engine on OS/2 Servers with NT clients (their choice not mine). I'm a newbie with Zope and wanted to understand the ODBC very well before trying to tie into UDB5 (since my guess is that I am the first one stupid enough to try this).
So I started with something real simple. A text file with four columns and three records.
I can create an ODBC connection through Zope with no problem. Going to the browse tab in the management screen actually shows me the table with the column definitions ... so I am getting from Zope, through the ODBC connector, through the WinNT ODBC drivers to the text file. Cool!
=======
Now to do real work, I create a DTML Method with the following
<!--#var standard_html_header-->
....
<dtml-in ZopeODBCTest> <dtml-var LAST_NAME> </dtml-in>
<!--#var standard_html_footer-->
I tested this exact syntax on my system and it worked perfectly. I'm running Zope 2.01 on Windows95. My database is SQLAnywhere version 5. I am running a 4-user server database engine. The query returned the column requested by my select statement. Forgive me for asking, but did you create a ZSQL method in addition to the connection? The "ZopeODBCTest" in your example must be the ZSQL method, not the ZODBC Connection. The method contains your select statement. Tom Passin
Running the 'View' returns the following result
Zope has encountered an error while publishing this resource.
Error Type: AttributeError Error Value: __len__
</dtml-excerpt>
participants (1)
-
Thomas B. Passin