[Tutor] How can I execute a PL/SQL Procedure directly through
Greg Lindstrom
gslindstrom at gmail.com
Mon Jul 30 15:51:55 CEST 2007
I've never tried anything like that before; others may be of more help at
this point. What I would try is reading the contents of the file into a
local variable.
my_data = file('metadata.sql').readlines() # read the file into a list
query = ''.join(my_data) # append the list into a
single string (including linefeeds)
results = db.execute(query)
That should -- though I haven't tried it -- run the script to create the
stored procedure. You would then call it via a SELECT statement to capture
the results of running the sproc.
ado allows you to set "debug" to 1 and it will echo your queries back to you
as you execute them.
--greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070730/76f85641/attachment.html
More information about the Tutor
mailing list