B
bellahsk
A Perl script using DBI calls a Stored Procedure on a SQL Server
database (connect, prepare, execute, fetchrow_arrayref, finish, etc).
The SP needs to:
- INSERT a record using arguments it got
- return result codes using a SELECT statement
If the SP SELECTs anything, even a constant value (e.g. SELECT "OK")
BEFORE the INSERT,
the calling Perl script gets the result.
If the SP SELECTs anything AFTER the INSERT,
no result comes back.
I do see in the DB that the INSERT succeeded though.
Any clue why INSERT might have such side effect?
database (connect, prepare, execute, fetchrow_arrayref, finish, etc).
The SP needs to:
- INSERT a record using arguments it got
- return result codes using a SELECT statement
If the SP SELECTs anything, even a constant value (e.g. SELECT "OK")
BEFORE the INSERT,
the calling Perl script gets the result.
If the SP SELECTs anything AFTER the INSERT,
no result comes back.
I do see in the DB that the INSERT succeeded though.
Any clue why INSERT might have such side effect?