[Zope] Problems with Database Connection.

Steve Spicklemire steve@spvi.com
Thu, 6 Jun 2002 00:36:04 -0500


Hi Antonio,

You need to either:

Have the names used as parameters in your ZSQL Method resolved by values=20=

in the REQUEST object

or

Have the names used as parameters in your ZSQL Method passed explicitly=20=

to the ZSQL Method.

e.g.,


<dtml-in "yourZSQLMethod( first_name=3D'fred', last_name=3D'jones')">
blah blah...
</dtml-in>


or assuming 'first_name' and 'last_name" were fields in a form that as=20=

been filled in and submitted:

<dtml-in yourZSQLMethod>
blah blah...
</dtml-in>

If that doesn't solve your problem... you'll need to post some code.

-steve

On Tuesday, June 4, 2002, at 06:03  PM, Antonio MATTA wrote:

>
> Hi,
>
> I am trying to do an application with a relational database=20
> connectivity.
> I am using the Psycopg Database connector to a Postgresql database.
>
> Everything seems to run fine when I test the database connectivity, =
and
> when I write and test the Z SQL and DTML methods.
>
> But when I test the whole application I got the following error =
message:
>
> Missing input variable, first_name --> this is the first entry value
>
> Traceback (innermost last):
>   File
> =
/usr/local/Zope-2.5.1/lib/python/Products/Hotfix_2002-04-15/__init__.py,
> line 51, in publish_module
>   File /usr/local/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line =
114,
> in publish
>   File /usr/local/Zope-2.5.1/lib/python/Zope/__init__.py, line 159, in
> zpublisher_exception_hook
>     (Object: AddressBook)
>  File /usr/local/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 98,=20=

> in
> publish
>   File /usr/local/Zope-2.5.1/lib/python/ZPublisher/mapply.py, line 88,=20=

> in
> mapply
>     (Object: insert_address)
>   File /usr/local/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line =
39,=20
> in
> call_object
>     (Object: insert_address)
>   File /usr/local/Zope-2.5.1/lib/python/OFS/DTMLDocument.py, line 127,=20=

> in
> __call__
>     (Object: insert_address)
>   File /usr/local/Zope-2.5.1/lib/python/DocumentTemplate/DT_String.py,
> line 473, in __call__
>     (Object: insert_address)
> File /usr/local/Zope-2.5.1/lib/python/DocumentTemplate/DT_Try.py, line
> 140, in render
>   File /usr/local/Zope-2.5.1/lib/python/DocumentTemplate/DT_Try.py, =
line
> 149, in render_try_except
>   File /usr/local/Zope-2.5.1/lib/python/Shared/DC/ZRDB/DA.py, line =
414,=20
> in
> __call__
>     (Object: insert_address_data)
>   File /usr/local/Zope-2.5.1/lib/python/DocumentTemplate/DT_String.py,
> line 473, in __call__
>     (Object: <string>)
>   File /usr/local/Zope-2.5.1/lib/python/Shared/DC/ZRDB/sqlvar.py, line=20=

> 99,
> in render
>     (Object: first_name)
> Missing Input: (see above)
>
> Thanks
>
> Antonio.
>
> --
> ANTONIO ALEJANDRO MATTA G=D3MEZ
> WebMaster
> Facultad de Ingenier=EDa
> Pontificia Universidad Javeriana - Seccional Cali
> Calle 18 No. 118 - 250 Av. Ca=F1asgordas
> Cali, Colombia
> Tel. (+2)  3218200 Ext 575
> Fax. 5552823
>
>
>
>
> _______________________________________________
> 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 )