[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dbi-users
Subject:    Re: Statement prep fails with "Error calling SQLGetInfo"
From:       "Mark Drummond" <md2600 () gmail ! com>
Date:       2008-03-12 15:03:06
Message-ID: a72ced8c0803120803n50b7b049r4fe6be4eaaa44af8 () mail ! gmail ! com
[Download RAW message or body]

I enabled global tracing at trace level 4. This is what I get back:

    DBI 1.601-ithread default trace level set to 0x0/4 (pid 4784) at
advisors.pl line 47
    -> prepare for DBD::DB2::db (DBI::db=HASH(0x213f33c)~0x213f2dc
'SELECT advisorId FROM db2inst1.USERADVISORS WHERE userid='abc123';')
thr#340dc
    New 'DBI::st' (for DBD::DB2::st, parent=DBI::db=HASH(0x213f2dc), id=undef)
    dbih_setup_handle(DBI::st=HASH(0x214d920)=>DBI::st=HASH(0x1b03c68),
DBD::DB2::st, 19dac08, Null!)
    dbih_make_com(DBI::db=HASH(0x213f2dc), 214880c, DBD::DB2::st, 160,
0) thr#340dc
    dbd_st_prepare'd sql f65537
	SELECT advisorId FROM db2inst1.USERADVISORS WHERE userid='abc123';
Error calling SQLGetInfo error -1 recorded: Error calling SQLGetInfo
Error calling SQLGetInfo error -1 recorded: Error calling SQLGetInfo
fbh 0: 'ADVISORID' , type 1,  10, dsize 10, p0 s34901420
   out: ftype 1, indp 0, bufl 41, rlen 41
    !! ERROR: -1 'Error calling SQLGetInfo' (err#0)
    <- prepare= DBI::st=HASH(0x214d920) at advisors.pl line 49
    !! ERROR: -1 CLEARED by call to finish method
    -> finish for DBD::DB2::st (DBI::st=HASH(0x214d920)~0x1b03c68) thr#340dc
    <- finish= 1 at advisors.pl line 95
    -> disconnect for DBD::DB2::db (DBI::db=HASH(0x213f33c)~0x213f2dc) thr#340dc
    <- disconnect= 1 at advisors.pl line 96
    <> DESTROY(DBI::st=HASH(0x214d920)) ignored for outer handle
(inner DBI::st=HASH(0x1b03c68) has ref cnt 1)
    -> DESTROY for DBD::DB2::st (DBI::st=HASH(0x1b03c68)~INNER) thr#340dc
    <- DESTROY= undef
    dbih_clearcom 0x1b03c68 (com 0x2148dac, type 3) done.

    -- DBI::END ($@: , $!: )
    -> disconnect_all for DBD::DB2::dr
(DBI::dr=HASH(0x213ef70)~0x213efdc) thr#340dc
    <- disconnect_all= 1 at C:/Perl/site/lib/DBI.pm line 718 via  at
advisors.pl line 0
!   <> DESTROY(DBI::db=HASH(0x213f33c)) ignored for outer handle
(inner DBI::db=HASH(0x213f2dc) has ref cnt 1)
!   -> DESTROY for DBD::DB2::db (DBI::db=HASH(0x213f2dc)~INNER) thr#340dc
!   <- DESTROY= undef during global destruction
    dbih_clearcom 0x213f2dc (com 0x214880c, type 2) done.

!   <> DESTROY(DBI::dr=HASH(0x213ef70)) ignored for outer handle
(inner DBI::dr=HASH(0x213efdc) has ref cnt 1)
!   -> DESTROY in DBD::_::common for DBD::DB2::dr
(DBI::dr=HASH(0x213efdc)~INNER) thr#340dc
!   <- DESTROY= undef during global destruction
    dbih_clearcom 0x213efdc (com 0x2136534, type 1) done.


Does this mean anything to anyone?


On 11/03/2008, Tim Bunce <Tim.Bunce@pobox.com> wrote:
> Enable tracing to see what's really going on.
>
>  Tim.
>
>  On Tue, Mar 11, 2008 at 12:02:01PM -0700, Mark wrote:
>  > Hi all,
>  >
>  > I'm a DBI newb, trying to pull some data from a DB2 database. This was
>  > actually working yesterday, but part way through the day, I started
>  > getting an error from my $dbh->prepare. If I changed something, I have
>  > no idea what. I have:
>  >
>  > my $stmt = "select id from db2inst1.users where user=?";
>  > my $sth = $dbh->prepare($stmt)
>  >    or die "\n\nCouldn't prepare statement: $DBI::errstr\n";
>  >
>  > But the die does not happen:
>  >
>  > DBD::DB2::db prepare failed: Error calling SQLGetInfo at advisors.pl
>  > line 46, <S
>  > TDIN> line 5.
>  >
>  > At this point I am not sure where to look. Any pointers would be
>  > appreciated.
>  >
>  > Thanks,
>  > Mark
>


-- 
Georgia: Why am I not doing what they're doing?
Rube: Because you're doing what you're doing. When it's time for you
to do something else you'll do that.

READ CAREFULLY. By reading this email, you agree, on behalf of your
employer, to release me from all obligations and waivers arising from
any and all NON-NEGOTIATED agreements, licenses, terms-of-service,
shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure,
non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I
have entered into with your employer, its partners, licensors, agents
and assigns, in perpetuity, without prejudice to my ongoing rights and
privileges. You further represent that you have the authority to
release me from any BOGUS AGREEMENTS on behalf of your employer.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic