[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Relational Database Connectivity

webmaster@zope.org webmaster@zope.org
Tue, 01 Oct 2002 00:06:34 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/RelationalDatabases.stx#3-85


      Zope provides a special URL syntax to access ZSQL Methods that
      always return a single result. The URL consists of the URL of
      the ZSQL Method followed by the argument name followed by the
      argument value. For example,
      *http://localhost:8080/employee_by_id/emp_id/42*. Note, this URL will
      return a single result object where as if you queried the ZSQL
      Method from DTML and passed it a single argument it would return
      a list of results that happend to only have one item in it.

        % Anonymous User - Sep. 28, 2002 8:05 am:
         /where as if/as if/ blf sorry for prev paragraf comment, should be here

        % Anonymous User - Sep. 28, 2002 8:10 am:
         - With ZSQL Methods that do return more than one result you mean that the Result object is a table?
         - is the special url syntax also possible w several argument values?

        % Anonymous User - Oct. 1, 2002 12:06 am:
         When I try this sort of thing in Zope 2.5.1, I get the error:

         The object at http://myurl/update_person_by_id/id/9 has an empty or missing docstring. Objects must have a
         docstring to be published.
         What do I do about this? For ZSQL Methods that have a single argument, I can select 'simple direct traversal'
         and leave out the variable name, and everything's ok. Is it something about the variable name 'id'? Or what?