Re: DBD-Oracle - obtaining OCI handles from $dbh
"Martin J. Evans" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Organization | Easysoft Limited |
| Message-ID | <[email protected]> |
On 27/10/2011 02:46, Lyle Brooks wrote: > I have created some Perl bindings for some existing custom C++ > libraries. > > One of these C++ libraries implements a class that uses Oracle > OCI calls. > > I would like to create a connection to the Oracle database > using Perl's DBI (DBD::Oracle) module, and then ideally share > that connection with the C++ libraries. > > This would require me to extract the Oracle OCI handles from > the $dbh object...and then pass them to the C++ libraries. > > What would be the best way to get access to the underlying > Oracle OCI handles from a $dbh object? I could be wrong but I don't think there is a way right now. You'd need to add an attribute or 2 on the $dbh to return them. It is fairly easy and if you've done some XS already I doubt you'd have much problem. Just do a search for an attribute like ora_parse_error_offset. Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com