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
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor