On the other hand, if you want to use DBI and DBD::Pg then you'd write:

        $rows = $dbh->rows;

Tim.

On Tue, Jun 24, 2003 at 09:38:26AM -0400, [EMAIL PROTECTED] wrote:
> 
> Hi!
> 
>    I`ve got a C++ function like this:
> 
>    int CDBPostgres::getRowCount()
>    {
>       return m_pgbase->Tuples();
>    }
> 
>    Can anybody explain me, how I can write this in Perl?
> 
>    I need it like this:
> 
>    int CDBPostgres::getRowCount()
>    {
>    PERL-CODE
>    }
> 
>    Have anybody written an interface between Perl(DBI) and C++?
> 
>    Thanks for any help!
> 
>    Mathias
> 
> The question is not DBI-specific, and there are several systems for mixing
> Perl and C or C++.  If you are comfortable with linking C and C++ together,
> you may want a Perl-to-C interface, since those are more numerous than C++
> specific systems.  I suggest the book "Using Perl and C" by Simon Cozens
> and Tim Jenness.  For low-level documentation, see the perlxs and perlembed
> manpages.  Alternatives include Inline::C and SWIG.  For a C++-centric
> solution try Pickle (http://search.cpan.org/dist/pickle/).
> 
> Hope this helps
> -John
> 
> 

Reply via email to