On Mon, Feb 02, 2004 at 09:01:50PM -0600, Stephen Clouse wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Is there any sane way to get at the DBI API from C?
> 
> I have a fair amount of database-layer code in XS/C for speed.  We still use DBI 
> because we do quite a bit of SQL from Perl, but then we also have this direct 
> OCI layer that does nasty things such as grabbing the Oracle handle pointers 
> from DBI, doing our own handle creation/prepares/executes and what not.
> 
> Instead of completely reinventing the wheel, it would be nice to be able to call 
> DBI at the C level, without losing too much speed.  I would much prefer being 
> able to work on and improve DBI as opposed to some half-assed proprietary OCI 
> layer.

Kristian's comments are all correct.

I'd just add that there is a "third way"... you could try using Oracle::OCI.
It gives you access from Perl to almost all of the OCI API.
It also knows how to "grab the Oracle handle pointers" from DBD::Oracle handles
the 'official' (though undocumented) way.

Tim.

Reply via email to