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
Date: Wed, 26 Oct 2011 21:46:30 -0400
From: bro...@deseret.com
To: dbi-users@perl.org
Subject: DBD-Oracle - obtaining OCI handles from $dbh
I have created some Perl bindings for some existing custom C++
libraries.
One of these C++ libraries implements a class that uses Oracle
OCI
Yes, I assumed I would need to extend DBD::Oracle is some manner
to allow those handles to be extracted from a $dbh object.
The specific OCI handles that the C++ libraries use are
- Environment handle
- Service Context handle
- Session handle
- Server handle
My initial thought process on how
Hmm!!
Well yes could be done but not as part of any release of DBD::Oracle it would
have to be you own hacked version
A few pointers to start.
You will not be able to 'get' a handle and retrun it as a Scalar it will only
ever be a pointer so you will just get some sort of number,
On 27/10/2011 17:43, John Scoles wrote:
Hmm!!
Well yes could be done but not as part of any release of DBD::Oracle it would
have to be you own hacked version
Why is that John? What is the problem with returning a C pointer via a
DBD::Oracle attribute? It is just a pointer to some memory
Thanks for those pointers.
I do agree with what Martin points out. My Perl script using DBI
and some XS bindings to the legacy C++ libraries would share the
same address space (not using threads in my application). This
is why I thought I could return the handles/pointers as scalars.
Taking
Date: Thu, 27 Oct 2011 18:42:23 +0100
From: martin.ev...@easysoft.com
To: dbi-users@perl.org
Subject: Re: DBI-Users RE: DBD-Oracle - obtaining OCI handles from $dbh
On 27/10/2011 17:43, John Scoles wrote:
Hmm!!
Well yes could be done but not as part of any release of
Date: Thu, 27 Oct 2011 14:14:03 -0400
From: bro...@deseret.com
To: martin.ev...@easysoft.com
CC: dbi-users@perl.org
Subject: Re: DBD-Oracle - obtaining OCI handles from $dbh
Thanks for those pointers.
I do agree with what Martin points out. My Perl script using DBI
and some XS
Ok, so with the following addition to Oracle.pm
DBD::Oracle::db-install_method(ora_oci_handles);
my little test program worked. By worked, I mean I did
a connect to the database, then did
my @h = $dbh-ora_oci_handles();
and it returned 4 integers (ie. the value of the pointers), which
is what
Glad we can help.
Keep us informed on how it works out
cheers
John
Date: Thu, 27 Oct 2011 14:39:15 -0400
From: bro...@deseret.com
To: byter...@hotmail.com
CC: martin.ev...@easysoft.com; dbi-users@perl.org
Subject: Re: DBI-Users RE: DBD-Oracle - obtaining OCI handles from $dbh
Ok,
10 matches
Mail list logo