[Zope] Newbie SQL problem: Query Error: Cannot render query t emplate

Farrell, Troy troy.farrell@wilcom.com
Fri, 1 Sep 2000 12:48:53 -0500

When I try to test my connection
(http://jester/profiles/Jet_database_connection/manage_test).  SQL is as

INSERT INTO test VALUES ( 'line one', 123456)

I get an error with the following traceback:

Error Type: Query Error
Error Value: Invalid Operation

Traceback (innermost last):
  File C:\PROGRA~1\JESTER\lib\python\ZPublisher\Publish.py, line 222, in
  File C:\PROGRA~1\JESTER\lib\python\ZPublisher\Publish.py, line 187, in
  File C:\PROGRA~1\JESTER\lib\python\Zope\__init__.py, line 221, in
    (Object: RoleManager)
  File C:\PROGRA~1\JESTER\lib\python\ZPublisher\Publish.py, line 171, in
  File C:\PROGRA~1\JESTER\lib\python\ZPublisher\mapply.py, line 160, in
    (Object: manage_test)
  File C:\PROGRA~1\JESTER\lib\python\ZPublisher\Publish.py, line 112, in
    (Object: manage_test)
  File C:\PROGRA~1\JESTER\lib\python\Shared\DC\ZRDB\Connection.py, line 180,
in manage_test
    (Object: RoleManager)
  File C:\PROGRA~1\JESTER\lib\python\Products\ZJetDA\db.py, line 130, in
Query Error: (see above)

Testing my SQL inside Access yields expected results.  The SQL is fine.
If a user tries to access a dtml_document that trys to modify the database,
they get the same error.  I'm thinking that Zope 2.2.0 and 2.2.1 have some
big problems with DA's under Windoze.  Unfortunately, my app _MUST_ use
Access.  I'm not thrilled.  Can anyone more familiar with Python clue me in
on this?

Troy Farrell

-----Original Message-----
From: Philipp Auersperg [mailto:zope@philosoft.at]
Sent: Thursday, August 31, 2000 10:14 AM
To: zope@zope.org; Stephen Nosal
Subject: Re: [Zope] Newbie SQL problem: Query Error: Cannot render query

When starting Zope as a service under Win NT always make sure that
the ODBC data sources you use are *system* data sources and not *user* data

This could explain why your ODBC connections work when you start Zope from
the console and
don't work when starting it as service.

	Zope 2.1.6 is not the best for SQL (problems with recordsets show up
when used in <dtml-tree>)
	Zope 2.2.0 has problems with ZODBC under Windows 2000 (Authorisation
dialogs pop up).

My hint:
	Use 2.1.4 or 2.2.1 (does it fine with SQL under Linux and Windows )


*********** REPLY SEPARATOR  ***********

On 31.08.2000 at 06:40 Stephen Nosal wrote:

>Have you tried running this from the DOS prompt? I ran into all sorts of
problems running 2.1.6 on NT4WS with the ODBCDA. Everything was fine when I
used the start and stop scripts from the command line. When I moved to
starting zope as a service, my ODBC connections kept failing. Never did find
an NT solution, I just moved everything to Linux.
>It's worth a try.
>- Steve
>On Wed, 30 August 2000, "Farrell, Troy" wrote:
>> Hello.
>> I am running Zope as a service on NT4WS.  I have multiple MS Access
>> databases connected to different ZJetDAs and I am not able to modify the
>> data in them with SQL statements.  For example, INSERT INTO test VALUES
>> (<dtml-sqlvar value_one type=string>, <dtml-sqlvar value_two type=int>)
>> returns the error "Query Error: Cannot render query template".  Can you
>> me what the cause is.  I think it might be a permissions problem, but I
>> everything wide open and I can't figure it out.
>> Thanks.
>> Troy Farrell
>> Troy Farrell
>> Video Operations Technician II
>> Williams VYVX Services
>> 918.573.3029
>> 918.573.1441 fax
>> mailto:troy.farrell@wilcom.com
>> http://www.williams.com