[Zope] create problems with 2.0.0a4

Donald Holten donner@biophysics.lanl.gov
Thu, 22 Jul 1999 09:52:23 -0600 (MDT)


	I have been having problems with create from the Zope verion 2.0.0a4.
	Here are the methods I have tried:
	
	Inside the create_WRTable:
	
	create table WRTable(
     		numruns decimal(4,0), 
     		lastrun datetime
     		)
     		
     	The syntax passes, but it complains upon tests or execution, saying:
Zope Error

Zope has encountered an error while publishing this resource. 

Error Type: SyntaxError
Error Value: unexpected token sequence.near :: 'e(\012 numruns'*' decimal(4,0), 
'
****************************** current state = 77 expects: ',', 'UNION',
'FLOAT', 'FROM', 'GROUP', 'DESC', 'ORDER', 'WHERE', 'AS', 'IN',
'INTERSECT', 'ASC', '*', '+', ')', '/', 'EXCEPT', '-', 'AND', 'VARCHAR', '*', 
';',
'INTEGER', 'NOT', '>', 'OR', '=', 'BETWEEN', 'HAVING', '<', ('nomatch1',)
current token = ((-8, 'user_defined_name'), 'DECIMAL')


	Here's it's traceback:
	
Traceback (innermost last):
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py, line 256, 
in publish_module
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py, line 161, 
in publish
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/mapply.py, line 154, in 
mapply
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py, line 98, in 
call_object
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/OFS/DTMLDocument.py, line 170, in 
__call__
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/OFS/DTMLDocument.py, line 165, in 
__call__
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_String.py, 
line 502, in __call__
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_Util.py, line 
315, in eval
    (Object: create_WRTable())
  File <string>, line 0, in ?
  File /usr/local/Zope-2.0.0a4-src/lib/python/Shared/DC/ZRDB/DA.py, line 395, in 
__call__
    (Object: create_WRTable)
  File /usr/local/Zope-2.0.0a4-src/lib/python/Products/ZGadflyDA/db.py, line 
175, in query
  File 
/usr/local/Zope-2.0.0a4-src/lib/python/Products/ZGadflyDA/gadfly/gadfly.py, line 
312, in execute
  File 
/usr/local/Zope-2.0.0a4-src/lib/python/Products/ZGadflyDA/gadfly/kjParser.py, 
line 1175, in DoParse1
  File 
/usr/local/Zope-2.0.0a4-src/lib/python/Products/ZGadflyDA/gadfly/kjParser.py, 
line 1167, in DoParse
  File 
/usr/local/Zope-2.0.0a4-src/lib/python/Products/ZGadflyDA/gadfly/kjParser.py, 
line 832, in GO
  File 
/usr/local/Zope-2.0.0a4-src/lib/python/Products/ZGadflyDA/gadfly/kjParser.py, 
line 760, in DoOneReduction
  File 
/usr/local/Zope-2.0.0a4-src/lib/python/Products/ZGadflyDA/gadfly/kjParser.py, 
line 816, in ParseError
SyntaxError: (see above)


     	Also I have tried: 

<!--#var standard_html_header-->
<!--#call "manage_addFolder('Sample')"-->
<!--#call 
"Sample.manage_addZGadflyConnection('zopadelic','','demo','YES',REQUEST)"-->
<!--#call "Sample.manage_addZSQLMethod('create_table','','zopadelic','','create 
table zopista (col)a integer, col_b integer)')"-->
<!--#call "Sample.create_table.manage_test(REQUEST)"-->
<!--#call "Sample.manage_addZSQLMethod('insert_data','','zopadelic','','insert 
into zopista (col_a,col_b values (120, 380)')"-->
<!--#call "Sample.insert_data.manage_test(REQUEST)"-->
<!--#call "Sample.manage_addZSQLMethod('view_data','','zopadelic','','select 
col_a,col_b from zopista')"-->

<p>The resulting data is:</p>
<ol>
<!--#with Sample-->
  <!--#in view_data-->
    <li>col_a is <!--#var col_a-->, col_b is <!--#var col_b-->.</li>
  <!--#/in-->
<!--#/with-->
<!--#var standard_html_footer-->

	This is from www.zope.org under "Sample of DTML Scripting and Gadfly.
	The error I get from this is:
	Zope Error

               Zope has encountered an error while publishing this resource. 

               Error Type: AttributeError
               Error Value: manage_addZSQLMethod

Here's the traceback:
	Traceback (innermost last):
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py, line 256, 
in publish_module
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py, line 161, 
in publish
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/mapply.py, line 154, in 
mapply
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/ZPublisher/Publish.py, line 98, in 
call_object
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/OFS/DTMLDocument.py, line 170, in 
__call__
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/OFS/DTMLDocument.py, line 165, in 
__call__
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_String.py, 
line 502, in __call__
    (Object: WebSolveInit)
  File /usr/local/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_Util.py, line 
315, in eval
    (Object: 
Sample.manage_addZSQLMethod('create_table','','zopadelic','','create table 
zopista (col)a integer, col_b integer)'))
  File <string>, line 0, in ?
  File /usr/local/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_Util.py, line 
126, in careful_getattr
AttributeError: (see above)

	If anyone has any ideas what might be the cause (or at least the 
solution), I would greatly appreciate it!  Thanks!
	Donner