Reputation: 45
I am using Perl (DBI:ODBC) to connect to Teradata. SQL statement being executed is replace procedure statement.
Teradata ODBC driver doesn't allow to prepare REPLACE PROCEDURE throwing exception.
So, instead of prepare + execute I've tried to use do
$rownum = $con->do("replace procedure ... ");
The problem is that if replace procedure can not be executed (syntax errors, missing objects) then ODBC driver doesn't generate an error. It simply returns recordset with the list of errors.
So if an error occured during replace procedure, then $rownum
value will be non zero.
But DBI->do doesn't support return of recordsets.
So, current situation is:
Generally: how to fetch results of the query that can't be prepared?
Upvotes: 1
Views: 694
Reputation: 5992
Force DBD::ODBC to use SQLExecDirect instead of SQLPrepare/SQLExecute. odbc_exec_direct
Upvotes: 1