Telman Yusupov
unread,Nov 29, 2008, 2:48:55 AM11/29/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
Hi everyone,
I'm developing a web2py application on top of a legacy Oracle database
and need to call some existing stored procedures that mplement some
complex transactional computations that would be impractical to
perform in application layer.
I have cx-oracle driver installed and properly working - DAL works
fine for straightforward web2py ORM activities.
cx-oracle implements callproc function for these purposes.
Unfortunately, I'm new to Python and wasn't able to modify sql.py in
gluon package to add it to DAL.
So, instead, I'm trying to use executesql method in my controller
trying to pass an anonymous PL/SQL block, as in this example:
db.executesql('begin my_proc_name(arg1, arg2); end;')
Unfortunately, I keep getting errors like the one below. I think I've
tried every possible combination but none of them work.
DatabaseError: ORA-06550: line 1, column 26:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of
the following:
; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue
Can you please advise what would be the best option here? Any
suggestions will be very much appreciated!
Thanks a lot in advance,
Telman