Sql methods can do any type of database interaction, including inserts, updates & deletes. You can find all kinds of documentation online about how to do this. One example (using dtml) is here: http://www.informit.com/articles/article.asp?p=24698

I suggest you re-read the zope database chapter, then look at some of the code examples in zopelabs. You should also look at the Znolk SQL Wizard from BlueDynamics.

One case where you would use an external method (python) would be inserting blob data such as an image. Generally, you don't need to write python for accessing text data.

Cheers,

--Aaron Fosdick


Ken Winter wrote:

Date: Thu, 28 Apr 2005 23:48:58 +0200
From: Charlie Clark <[EMAIL PROTECTED]>
Subject: RE: [Zope-DB] ZPTs and database accesses
To: zope-db@zope.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"


On 2005-04-28 at 20:26:47 [+0200], Ken Winter <[EMAIL PROTECTED]> wrote:


Andreas -

Thanks for your answer. I'm relieved to know that the ZPT-ZSQL


combination


will suffice for database accesses. As a Zope neophyte, though, I still
need an example or tutorial showing me how to get data from page to


database


via ZPTs and ZSQL objects. Can you point me to such a reference?


Yes, the Zope book is the place to look.

You create a ZSQL method with the SQL code

You then call this method through your ZPT or better in the case of
posting
from page to database a PythonScript which in turn calls the ZSQL method
and
passes the parameters.

Charlie
--
Charlie Clark
eGenix.com



So, is it true that for posting (moving data from page to database) it's NOT
possible to do this by a direct ZPT-to-ZSQL method call? - i.e. that it can
ONLY be done via a Python script?


I've been trying to figure out a way to do it directly, because it seemed
that if possible that would be the simplest way.  But if it's not possible,
then I can stop wasting my time on that path and start learning to do it
with Python.

- Ken


_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db



_______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db

Reply via email to