[Zope] Follow-up question about calling stored functions with
OracleDA
Jim Cain
jec@mgmt-inc.com
Thu, 13 Jan 2000 15:27:56 -0500 (EST)
What you suggest would work fine except that the function in question
modifies the database, and Oracle will not allow you to call a function in
a select unless you restrict it to queries only.
On Thu, 13 Jan 2000, Bruno Mattarollo wrote:
> Hello...
>
> I must prevent you before anything, I didn't tryied the solution
> I am proposing, just an idea... Why you don't just do:
>
> ZSQL: id: sqlInsertPerson
>
> SELECT
> insert_person(
> [...snip...] ) new_id
> FROM
> dual;
>
> Then from your DTML Document
>
> <dtml-in sqlInsertPerson>
> <dtml-var new_id>
> </dtml-in>
>
> Hope this works.!!! ;)
>
> Cheers,
>
>
> /B
>
> Bruno Mattarollo <brunomadv@ciudad.com.ar>
>
>
> -----Mensaje original-----
> De: zope-admin@zope.org [mailto:zope-admin@zope.org]En nombre de Jim
> Cain
> Enviado el: Thursday, January 13, 2000 12:11 PM
> Para: zope@zope.org
> Asunto: [Zope] Follow-up question about calling stored functions with
> OracleDA
>
>
> Okay, I've managed to call a stored function. It looks like this:
>
> declare
> new_id number;
> begin
> new_id := contact_maint.insert_person
> (
> <dtml-sqlvar first_name type=nb optional>,
> <dtml-sqlvar middle_name type=nb optional>,
> <dtml-sqlvar maiden_name type=nb optional>,
> <dtml-sqlvar last_name type=nb optional>
> );
> end;
>
> Now the next question is: How do I return "new_id" so I can refer to it
> inside a <dtml-in></dtml-in> call to this SQL method?
>
> Thanks,
> Jim
>
>
> _______________________________________________
> 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 )
>