[Zope] Calling oracle stored proc from FS product

Gilberto Pereira ggsfp@fct.unl.pt
Mon, 10 Feb 2003 17:03:16 +0000


Ruslan Spivak wrote:

> Hello, zope users!
>
> Can anybody tell me how to call oracle stored procedure from
> filesystem based product?
>
> Thanks in advance.
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
Hello!!!
I supose you're using DCOracle2, right?

Well, what i do is using the cursor's callproc method...
Basically i´ve this method below that does it...

def executeProc(proc, *params):
    bd_connection = connect_BD()
    cursor = bd_connection.cursor()
    ret = cursor.callproc(proc, *params)   
    cursor.close()
    bd_connection.close()
    return ret

(the connect_BD calls the connect method in DCOracle2 with my connection 
string)

Cheers
Gil