Closed felipenoris closed 5 years ago
dpiStmt_execute sends a single statement to the DB for processing. The PL/SQL block is a single statement. Each CREATE is also a single statement.
SQL scripts are a tool feature.
You may be able to rewrite some scripts to make use EXECUTE IMMEDIATE inside a PL/SQL block. Or abandon SQL scripts altogether and use your own format that your app likes. Or do the parsing you mentioned; see how @anthony-tuininga did it in https://github.com/oracle/python-cx_Oracle/blob/master/samples/SampleEnv.py The parsing is easier if you don't try to be as flexible as SQL*Plus is.
Oh, I see. Thanks!
Hi! I've been using
dpiStmt_execute
successfully to execute a PL/SQL script like this one:However, I can't use it to execute something like
This stackoverflow answer suggests parsing the script file looking for
;
delimiters. Is this the best solution?