[Zope] Z SQL Methods
Tino Wildenhain
tino at wildenhain.de
Wed Jan 7 00:40:24 EST 2004
Hi,
Casey Duncan wrote:
> On Tue, 6 Jan 2004 13:55:07 -0500 (EST)
> Asad Habib <ahabib at engin.umich.edu> wrote:
>
>
>>Hello. Does anyone know if you can have multiple queries within a
>>single Z SQL method? Thanks.
>>
>>- Asad
>
>
> Yes, so long as they do not return records. just put <dtml-var
> sql_delimiter> lines between them. i.e.:
>
> UPDATE foo SET BAR=NULL
>
> <dtml-var sql_delimiter>
>
> UPDATE baz SET splat=NULL
>
> This allows you to perform multiple inserts/updates/deletes in a single
> database transaction for instance.
; should be equivalent to sql_delimiter I think. May be it depends on
the actual database.
If database supports transactions, it should make no difference if
all statements are in one ZSQL method or actually in different
distinct and subsequently called ones :-)
Regards
Tino Wildenhain
More information about the Zope
mailing list