I have found that the "This is not a query" response means your non select SQL command executed with no errors. __________________________________________________________________ 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: <rgines@purina.com> To: <zope@zope.org> Sent: Friday, November 19, 1999 7:28 PM Subject: [Zope] ZSQL Create Table
I've been trying to create tables through ZSQL Methods and have been getting some strange results. From the few posts that I have seen in the archives it looks like there have been some behavioral changes from Zope 1.x to 2.x that effect the ZSQ addMethod.
For example, from the ZSQL add form method if you use
Create table testtwo (col_c varchar, col_d varchar)
as the 'Query' you get a responce to the effect that this is not a query ... which I would agree with, but I'm not in the habit of arguing with my computers.
If you try to run the Method a second time you get the error
Error, exceptions.NameError: cannot create TESTTWO, exists
Using the template from 'Sample of DTML Scripting and Gadfly' at classic.zope.org:8080/Documentation/HowTo/SampleGadfly/index_html
I try to execute
... <!--#call "Sample.manage_addZSQLMethod('create_table','', 'zopadelic','','create table zopista (col_a integer, col_b integer)')"--> ...
The error I get is
Error Type: AttributeError Error Value: manage_addZSQLMethod
With a traceback of
Traceback (innermost last): File D:\PROGRA~1\GYNZER~1\lib\python\ZPublisher\Publish.py, line 214, in publish_module File D:\PROGRA~1\GYNZER~1\lib\python\ZPublisher\Publish.py, line 179, in publish File D:\PROGRA~1\GYNZER~1\lib\python\Zope\__init__.py, line 201, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File D:\PROGRA~1\GYNZER~1\lib\python\ZPublisher\Publish.py, line 165, in publish File D:\PROGRA~1\GYNZER~1\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: GadflyTestCreate) File D:\PROGRA~1\GYNZER~1\lib\python\ZPublisher\Publish.py, line 102, in call_object (Object: GadflyTestCreate) File D:\PROGRA~1\GYNZER~1\lib\python\OFS\DTMLMethod.py, line 145, in __call__ (Object: GadflyTestCreate) File D:\PROGRA~1\GYNZER~1\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: GadflyTestCreate) File D:\PROGRA~1\GYNZER~1\lib\python\DocumentTemplate\DT_Util.py, line 321, in eval (Object: Sample.manage_addZSQLMethod('create_table','','zopadelic','','create table zopista (col_a integer, col_b integer)')) File <string>, line 0, in ? File D:\PROGRA~1\GYNZER~1\lib\python\DocumentTemplate\DT_Util.py, line 125, in careful_getattr AttributeError: (see above)
I looked at the SQL.py file and the attributes seem to be passing correctly, but I'm still a python newbie ... although ramping up quickly.
Any assistance would be apprecited. Thanks.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope No cross posts or HTML encoding! (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )