It seems not related to $ora_errstr="", rather you have something like $DBI::errstr=$var in your code.
| [reply] [d/l] [select] |
$ora_errstr=""; and $DBI::errstr=""; give same error
| [reply] |
You can't set a value to a read-only variable, why are you trying? The error string for a given handle is reset at most DBI method calls, so you shouldn't need to reset it.
| [reply] |
I'm not a DBD::Oracle expert (but why should that stop me from commenting!). Looking at the doc and source for DBD::Oracle, I see no mention of $ora_errstr. Are you aliasing it somewhere in your code (*ora_errstr = $DBI::errstr)?
| [reply] |
ora_errstr is from oraperl. oraperl is perl with Oracle libraries compiled in from before the days of DBI and DBD::Oracle. If you use one (oraperl or DBI) you shouldn't need the other in the same program (and you should only need oraperl if you need to support legacy code). You shouldn't need to set the errstr in either, it is just something that is automatically set (sort of, see this) after an error. So you can print it (or something) after you detect an error.
Update: Oraperl is also a compatibility module from DBD-Oracle (to make oraperl programs transparently use DBI) so $ora_errstr is likely an alias for $DBI::errstr. Previous comments that you shouldn't need to set the errstr still apply.
Another update: Apparently Oraperl
is no longer supported. I suggest transitioning to pure DBI. | [reply] |